Re: PHP 8 is_file/is_dir input handling
| From: | Christian Schneider | Date: | Thu, 03 Dec 2020 08:38:41 +0000 |
| Subject: | Re: PHP 8 is_file/is_dir input handling | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-112391@lists.php.net to get a copy of this message | ||
Am 03.12.2020 um 09:27 schrieb Côme Chilliet <come.chilliet@fusiondirectory.org>:
>
> Le Tue, 1 Dec 2020 12:06:22 -0800,
> Stanislav Malyshev <smalyshev@gmail.com> a écrit :
>
>> But it's not incorrect. if is_file("abc\0") returns false, it's correct
>>
>> - "abc\0" is not a correct filename, so I expect it to return false. It
>> does exactly what I need, so it's correct.
>
> Hear hear. I think this is the best summary in this discussion.
>
> is_file and is_dir should just return false on values which are not files and
> dirs.
>
> Can we please fix this for future PHP versions?
> Does it need an RFC?
There is a PR for this which was approved by Nikita. But I'm not sure what the plan is on
merging into master or other branches:
https://github.com/php/php-src/pull/6478
<https://github.com/php/php-src/pull/6478>
- Chris