mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Fixing other uses of glob() to check for false values. Fixes #6044
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8034 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
b35de27de1
commit
55cc02bc08
2 changed files with 6 additions and 0 deletions
|
@ -526,6 +526,10 @@ class Folder extends Object {
|
|||
if (is_dir($path) === true) {
|
||||
$normalFiles = glob($path . '*');
|
||||
$hiddenFiles = glob($path . '\.?*');
|
||||
|
||||
$normalFiles = $normalFiles ? $normalFiles : array();
|
||||
$hiddenFiles = $hiddenFiles ? $hiddenFiles : array();
|
||||
|
||||
$files = array_merge($normalFiles, $hiddenFiles);
|
||||
if (is_array($files)) {
|
||||
foreach ($files as $file) {
|
||||
|
|
|
@ -277,6 +277,8 @@ class TestManager {
|
|||
}
|
||||
|
||||
$files = glob($directory . DS . '*');
|
||||
$files = $files ? $files : array();
|
||||
|
||||
foreach ($files as $file) {
|
||||
if (is_dir($file)) {
|
||||
$fileList = array_merge($fileList, $this->_getRecursiveFileList($file, $fileTestFunction));
|
||||
|
|
Loading…
Add table
Reference in a new issue