Skip to content

Commit

Permalink
[Filesystem] Fix str_contains deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
NeilPeyssard committed Mar 15, 2024
1 parent 5a55360 commit b3e9cdb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Filesystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ private static function doRemove(array $files, bool $isRecursive): void

throw new IOException(sprintf('Failed to remove directory "%s": ', $file).$lastError);
}
} elseif (!self::box('unlink', $file) && (str_contains(self::$lastError, 'Permission denied') || file_exists($file))) {
} elseif (!self::box('unlink', $file) && ((self::$lastError && str_contains(self::$lastError, 'Permission denied')) || file_exists($file))) {
throw new IOException(sprintf('Failed to remove file "%s": ', $file).self::$lastError);
}
}
Expand Down

0 comments on commit b3e9cdb

Please sign in to comment.