Skip to content

Commit b9c09ee

Browse files
committed
Merge branch '5.4' into 6.4
* 5.4: [Filesystem] Fix str_contains deprecation [Security] Correctly initialize the voter property [FrameworkBundle] Fix typo Update `changed-translation-files` step with native git diff command [Lock] Check the correct SQLSTATE error code for MySQL [ErrorHandler] Fix `ErrorHandlerTest::tearDown()` visibility [Lock] compatiblity with redis cluster 7 fix: typo
2 parents 7f3b175 + b3e9cdb commit b9c09ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Filesystem.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ private static function doRemove(array $files, bool $isRecursive): void
198198

199199
throw new IOException(sprintf('Failed to remove directory "%s": ', $file).$lastError);
200200
}
201-
} elseif (!self::box('unlink', $file) && (str_contains(self::$lastError, 'Permission denied') || file_exists($file))) {
201+
} elseif (!self::box('unlink', $file) && ((self::$lastError && str_contains(self::$lastError, 'Permission denied')) || file_exists($file))) {
202202
throw new IOException(sprintf('Failed to remove file "%s": ', $file).self::$lastError);
203203
}
204204
}

0 commit comments

Comments
 (0)