Update Tools.php
PHP 7.2 & 7.3
This commit is contained in:
@@ -2148,7 +2148,7 @@ class ToolsCore
|
||||
if ($catapitalise_first_char) {
|
||||
$str = Tools::ucfirst($str);
|
||||
}
|
||||
return preg_replace_callback('/_+([a-z])/', create_function('$c', 'return strtoupper($c[1]);'), $str);
|
||||
return preg_replace_callback('/_+([a-z])/', function ($c) { return strtoupper($c[1]); }, $str);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -3733,9 +3733,7 @@ exit;
|
||||
return;
|
||||
}
|
||||
|
||||
$sort_function = create_function('$a, $b', "return \$b['$column'] > \$a['$column'] ? 1 : -1;");
|
||||
|
||||
uasort($rows, $sort_function);
|
||||
uasort($rows, function ($a, $b) { return $b['$column'] > $a['$column'] ? 1 : -1; });
|
||||
|
||||
$unit = pow(10, $precision);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user