Please be patient with me... I'm newbie in OCS and English is not my first language
I've just upgraded OCS Server from 2.0.1 to 2.3.1. All fine here!
I visit URL
Nothing is rendered
cat /etc/httpd/logs/error_log
[Mon Oct 16 19:18:00 2017] [error] [client 10.225.213.23] PHP Parse error: syntax error, unexpected T_FUNCTION in /usr/share/ocsinventory-reports/ocsreports/require/menu/Menu.php on line 57
/**
* Sort the Menu
*
* @return number
*/
public function sortMenu() {
foreach ($this->getChildren() as $menu) {
if ($menu->hasChildren()) {
$menu->sortMenu();
}
}
uasort($this->_children, function($a, $b) { <---------- Line 57
if ($a->getPriority() == $b->getPriority()) {
return 0;
}
return ($a->getPriority() < $b->getPriority()) ? -1 : 1;
});
}
Well now:
Your requirements still says PHP 4.3.2 or higher but
http://php.net/manual/en/functions.anonymous.php says anonymous functions become available since 5.3.0.
Obviously I MUST upgrade my PHP installation... or NOT... Am I missing something?
Thanks in advanced !!!!