Commit 632eab7f authored by Mikael Salson's avatar Mikael Salson
Browse files

ObjectSort.php: Syntax didn't work with PHP7

parent b414f82f
......@@ -9,7 +9,8 @@ function basic_sort($key, $comparison) {
return function ($first, $second) use ($key, $comparison) {
if (is_array($key)) {
for ($i = 0; $i < count($key); $i++) {
$result = $comparison($first->$key[$i](), $second->$key[$i]());
$member_function = $key[$i];
$result = $comparison($first->$member_function(), $second->$member_function());
if ($result != 0)
return $result;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment