mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Overriding the files array, so it will not try to perform actions on files that no longer exists.
This commit is contained in:
parent
4d1f41dddc
commit
edbe60e965
1 changed files with 2 additions and 3 deletions
|
@ -592,7 +592,7 @@ class UpgradeShell extends Shell {
|
|||
if (!is_dir($path)) {
|
||||
continue;
|
||||
}
|
||||
$files = array();
|
||||
$this->_files = array();
|
||||
$Iterator = new RegexIterator(
|
||||
new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path)),
|
||||
'/^.+\.(' . $extensions . ')$/i',
|
||||
|
@ -600,10 +600,9 @@ class UpgradeShell extends Shell {
|
|||
);
|
||||
foreach ($Iterator as $file) {
|
||||
if ($file->isFile()) {
|
||||
$files[] = $file->getPathname();
|
||||
$this->_files[] = $file->getPathname();
|
||||
}
|
||||
}
|
||||
$this->_files = array_merge($this->_files, $files);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue