Merge pull request #572 from xm74/patch-2
filesystem.class.php update for PHP 7.2 compatibility
This commit is contained in:
commit
15839a7580
|
@ -12,7 +12,11 @@ class Filesystem {
|
||||||
}
|
}
|
||||||
|
|
||||||
if($sortByDate) {
|
if($sortByDate) {
|
||||||
usort($directories, create_function('$a,$b', 'return filemtime($b) - filemtime($a);'));
|
usort($directories,
|
||||||
|
function($a, $b) {
|
||||||
|
return filemtime($b) - filemtime($a);
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $directories;
|
return $directories;
|
||||||
|
@ -27,7 +31,11 @@ class Filesystem {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($sortByDate) {
|
if ($sortByDate) {
|
||||||
usort($files, create_function('$a,$b', 'return filemtime($b) - filemtime($a);'));
|
usort($files,
|
||||||
|
function($a, $b) {
|
||||||
|
return filemtime($b) - filemtime($a);
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $files;
|
return $files;
|
||||||
|
|
Loading…
Reference in New Issue