Bug #12972 Updated: is_file() sends errors to error log
| From: | mfischer@php.net | Date: | Mon, 27 Aug 2001 14:48:15 +0000 |
| Subject: | Bug #12972 Updated: is_file() sends errors to error log | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-64406@lists.php.net to get a copy of this message | ||
ID: 12972
Updated by: mfischer
Reported By: advgraph@regiocom.net
Old Status: Open
Status: Closed
Bug Type: Filesystem function related
Operating System: Redhat 6.2
PHP Version: 4.0.5
New Comment:
Wrong. You use file_exists() to first determine if something exists. The name is a bit misleading,
you can verify existense of files, directories and links (read: any file type). file_exists() is
written to _not_ output any error. Whereas the is_*() functions are for good reason.
So, if you don't want to use file_exists(), you need to use @is_*(). This is the expected
behaviour.
- Markus
Previous Comments:
------------------------------------------------------------------------
[2001-08-27 07:19:34] advgraph@regiocom.net
when using the is_file function and a file is not found an error is sent back to the error log. I
expect this simply to return false in this case. I am aware of file_exists, however in the manual:
Returns true if the filename exists and is a regular file.
Therefore I expect this to also be testing for file existence. I do not expect debugging output
leading me to have to use @is_file and possibly miss other crucial error output.
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=12972&edit=1