SplFileInfo: getRealPath can return false in ArchivableFilesFinder (#10665)

main
Stephan 2 years ago committed by GitHub
parent 37627f10d0
commit 1fff47bfc7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -58,7 +58,7 @@ class ArchivableFilesFinder extends \FilterIterator
$this->finder = new Finder();
$filter = function (\SplFileInfo $file) use ($sources, $filters, $fs): bool {
if ($file->isLink() && strpos($file->getRealPath(), $sources) !== 0) {
if ($file->isLink() && ($file->getRealPath() === false || strpos($file->getRealPath(), $sources) !== 0)) {
return false;
}

Loading…
Cancel
Save