Open
Description
Actually there's no validation before the parameter is passed to fopen(). This could end in a warning.
We could fix this by something like:
if (!(\file_exists($filename) || \is_readable($filename))) {
throw new \InvalidArgumentException("File does not exists or is not readable.");
}
But this would break usage with stream-wrappers which do not implement url_stat() completely (without mode
(2)).
So implementing this check would be a BC break.
Any needs to "fix" this or is the current E_WARNING enough? Ideas?
Metadata
Metadata
Assignees
Labels
No labels