Re: [PHP-DEV] PHP 8 is_file/is_dir input handling

2020-12-09 Thread Mike Schinkel
> On Dec 8, 2020, at 11:27 AM, Christian Schneider > wrote: > > Am 08.12.2020 um 17:16 schrieb Mike Schinkel >: >> 1. Please consider making is_file() return false for an embedded \0 and no >> longer throw an exception or generate a warning. > > The PR implementi

Re: [PHP-DEV] PHP 8 is_file/is_dir input handling

2020-12-08 Thread Christian Schneider
Am 08.12.2020 um 17:16 schrieb Mike Schinkel : > 1. Please consider making is_file() return false for an embedded \0 and no > longer throw an exception or generate a warning. The PR implementing this has already been merged for inclusion in PHP 8.0.1: https://github.com/php/php-src/pull/6478 >

Re: [PHP-DEV] PHP 8 is_file/is_dir input handling

2020-12-08 Thread Mike Schinkel
> On Dec 1, 2020, at 12:18 PM, Aimeos | Norbert Sendetzky > wrote: > > Hi internals > > PHP 8 is stricter in checking input data then PHP 7. This is good but > has some side effects for is_file(), is_dir() and similar functions when > invalid paths are passed for checking. > > In PHP 7, this r

Re: [PHP-DEV] PHP 8 is_file/is_dir input handling

2020-12-03 Thread Christian Schneider
Am 03.12.2020 um 09:27 schrieb Côme Chilliet : > > Le Tue, 1 Dec 2020 12:06:22 -0800, > Stanislav Malyshev 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 n

Re: [PHP-DEV] PHP 8 is_file/is_dir input handling

2020-12-02 Thread Larry Garfield
On Wed, Dec 2, 2020, at 2:18 AM, Christian Schneider wrote: > Am 01.12.2020 um 21:13 schrieb Reindl Harald (privat) : > > Am 01.12.20 um 21:09 schrieb Stanislav Malyshev: > >>> we are running error_reporting E_ALL for 17 years now and don't > >>> distinct between notice / warning / error, it has to

Re: [PHP-DEV] PHP 8 is_file/is_dir input handling

2020-12-02 Thread Reindl Harald (privat)
Am 02.12.20 um 09:18 schrieb Christian Schneider: Am 01.12.2020 um 21:13 schrieb Reindl Harald (privat) : Am 01.12.20 um 21:09 schrieb Stanislav Malyshev: we are running error_reporting E_ALL for 17 years now and don't distinct between notice / warning / error, it has to be fixed - period S

Re: [PHP-DEV] PHP 8 is_file/is_dir input handling

2020-12-02 Thread Christian Schneider
Am 01.12.2020 um 21:13 schrieb Reindl Harald (privat) : > Am 01.12.20 um 21:09 schrieb Stanislav Malyshev: >>> we are running error_reporting E_ALL for 17 years now and don't >>> distinct between notice / warning / error, it has to be fixed - >>> period >> Surely you do. Your code continues to run

Re: [PHP-DEV] PHP 8 is_file/is_dir input handling

2020-12-01 Thread Stanislav Malyshev
Hi! In PHP 7, this returns FALSE: php -r 'var_dump(is_file("ab\0c"));' In PHP 8, the same code throws a ValueException. Problem is now that I think this is a mistake. Exceptions should not be thrown on such values, it only breeds boilerplate code (now you'd have to wrap each call to is_* i

[PHP-DEV] PHP 8 is_file/is_dir input handling

2020-12-01 Thread Aimeos | Norbert Sendetzky
Hi internals PHP 8 is stricter in checking input data then PHP 7. This is good but has some side effects for is_file(), is_dir() and similar functions when invalid paths are passed for checking. In PHP 7, this returns FALSE: php -r 'var_dump(is_file("ab\0c"));' In PHP 8, the same code throws a