Fix multiple PHP warnings

This commit is contained in:
markjcrane
2025-11-01 19:58:21 -06:00
parent a675660473
commit bf5bb4f642
41 changed files with 539 additions and 442 deletions

View File

@@ -52,8 +52,9 @@ class file {
* Glob search for a list of files
* @var string $dir this is the directory to scan
* @var boolean $recursive get the sub directories
* @return array list of files or an empty array if not found
*/
public function glob($dir, $recursive) {
public function glob($dir, $recursive): array {
$files = [];
if ($dir != '' || $dir != '/') {
$tree = glob(rtrim($dir, '/') . '/*');
@@ -69,12 +70,6 @@ class file {
}
}
}
else {
$files[] = $file;
}
}
else {
$files[] = $file;
}
return $files;
}