mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-06-28 00:24:23 +00:00
Fix multiSort create_function is deprecated in PHP 7.2
This commit is contained in:
@@ -43,8 +43,10 @@ class multiSort {
|
||||
$t = 'strnatcmp($a[' . $key . '], $b[' . $key . '])';
|
||||
break;
|
||||
}
|
||||
usort($array, create_function('$a, $b', 'return ' . ($order ? '' : '-') . '(' . $t . ');'));
|
||||
|
||||
usort($array, function($a, $b) use ($order, $t) {
|
||||
return ($order ? '' : '-') . ($t);
|
||||
});
|
||||
}
|
||||
return $array;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user