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;
|
||||||
|
@ -179,4 +187,4 @@ class Filesystem {
|
||||||
$zip->extractTo($destination);
|
$zip->extractTo($destination);
|
||||||
return $zip->close();
|
return $zip->close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue