Skip to content

Commit b3e9cdb

Browse files
committed
[Filesystem] Fix str_contains deprecation
1 parent 5a55360 commit b3e9cdb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: Filesystem.php

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

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

0 commit comments

Comments
 (0)