Merge pull request #572 from xm74/patch-2

filesystem.class.php update for PHP 7.2 compatibility
This commit is contained in:
Diego Najar 2017-12-07 17:29:32 +01:00 committed by GitHub
commit 15839a7580
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;
@ -179,4 +187,4 @@ class Filesystem {
$zip->extractTo($destination);
return $zip->close();
}
}
}