make sure directory is given
This commit is contained in:
parent
965fa3a499
commit
89987cd8f5
@ -151,7 +151,7 @@ abstract class FileUtil {
|
|||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public static function cleanDirectory($directory, $maxFileAgeInDays = 10., $recursive = false) {
|
public static function cleanDirectory($directory, $maxFileAgeInDays = 10., $recursive = false) {
|
||||||
if (!is_dir($directory) || !is_readable($directory)) {
|
if (!$directory || !is_dir($directory) || !is_readable($directory)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$dirHandle = opendir($directory);
|
$dirHandle = opendir($directory);
|
||||||
|
Loading…
Reference in New Issue
Block a user