Re: Bug #14108: file_exists() prints a warning when it shouldn't

From: Date: Tue, 20 Nov 2001 03:26:18 +0000
Subject: Re: Bug #14108: file_exists() prints a warning when it shouldn't
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-71009@lists.php.net to get a copy of this message
There was some question of this quite some time ago. is_file() was changed (to many peoples annoyance by what I saw) to report the error. file_exists still shouldn't report the error. Personally, I think they both shouldn't. If it doesn't exist, it sure as hell isn't a file, so it should be false. Cluttering too many error messages is bad. People don't want to have to change their log level because existing scripts like it. -- Mike ----- Original Message ----- From: <cech@debian.org> To: <php-dev@lists.php.net> Sent: Monday, November 19, 2001 6:35 AM Subject: [PHP-DEV] Bug #14108: file_exists() prints a warning when it shouldn't > From: cech@debian.org > Operating system: Debian > PHP version: 4.1.0RC1 > PHP Bug Type: *Directory/Filesystem functions > Bug description: file_exists() prints a warning when it shouldn't > > Running this code > > <?file_exists("/etc/passwd/bla");?> > > (where /etc/passwd exists for those non-UNIX people) > > gives this warning > > Warning: stat failed for /etc/passwd/bla (errno=20 - Not a directory) in > .... > > > This worked in 4.0.6 and doesn't in 4.1.0RC (1 and 2). It's been reported > as #114409 in Debian with a patch > -- > Edit bug report at: http://bugs.php.net/?id=14108&edit=1 > > > -- > PHP Development Mailing List <http://www.php.net/> > To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net > For additional commands, e-mail: php-dev-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.dev (#71009) next »