Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:112391 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 8338 invoked from network); 3 Dec 2020 09:10:53 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 3 Dec 2020 09:10:53 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 09C301804C9 for ; Thu, 3 Dec 2020 00:38:47 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,HTML_MESSAGE, SPF_HELO_NONE,SPF_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from darkcity.gna.ch (darkcity.gna.ch [195.49.47.11]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 3 Dec 2020 00:38:46 -0800 (PST) Received: from wifi.home (unknown [IPv6:2a02:1205:5053:a220:916e:3c7f:6fe1:f2ce]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by darkcity.gna.ch (Postfix) with ESMTPSA id C9E1C6C1602; Thu, 3 Dec 2020 09:38:42 +0100 (CET) Message-ID: <973A62E2-13F2-45A1-AC6A-BD5E11C629B2@cschneid.com> Content-Type: multipart/alternative; boundary="Apple-Mail=_3CA942DA-FC74-4B5B-B2A4-12AAA385FEC9" Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Date: Thu, 3 Dec 2020 09:38:41 +0100 In-Reply-To: <20201203092736.6216e9cc@mcmic-probook.opensides.be> Cc: PHP Internals To: =?utf-8?Q?C=C3=B4me_Chilliet?= References: <0774c293-afd7-d8b9-175f-217ed600d1ea@aimeos.com> <29529061-dc71-c759-590a-b4786936f8c5@aimeos.com> <96e40442-a649-f9af-a0cc-dd43cfd1bd0c@gmx.de> <20201203092736.6216e9cc@mcmic-probook.opensides.be> X-Mailer: Apple Mail (2.3608.120.23.2.4) Subject: Re: [PHP-DEV] PHP 8 is_file/is_dir input handling From: cschneid@cschneid.com (Christian Schneider) --Apple-Mail=_3CA942DA-FC74-4B5B-B2A4-12AAA385FEC9 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Am 03.12.2020 um 09:27 schrieb C=C3=B4me Chilliet = : >=20 > Le Tue, 1 Dec 2020 12:06:22 -0800, > Stanislav Malyshev a =C3=A9crit : >=20 >> But it's not incorrect. if is_file("abc\0") returns false, it's = correct=20 >> - "abc\0" is not a correct filename, so I expect it to return false. = It=20 >> does exactly what I need, so it's correct. >=20 > Hear hear. I think this is the best summary in this discussion. >=20 > is_file and is_dir should just return false on values which are not = files and > dirs. >=20 > 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 = - Chris --Apple-Mail=_3CA942DA-FC74-4B5B-B2A4-12AAA385FEC9--