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: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, November 19, 2001 6:35 AM
Subject: [PHP-DEV] Bug #14108: file_exists() prints a warning when it
shouldn't
> From: [EMAIL PROTECTED]
> 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]