Update to PHP 7.2 compatibility

This commit is contained in:
Max Kostikov 2017-12-06 20:14:33 +02:00 committed by GitHub
parent 4500fe78e1
commit cdec4580a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 3 deletions

View File

@ -12,7 +12,11 @@ class Filesystem {
}
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;
@ -27,7 +31,11 @@ class Filesystem {
}
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;