Re: IS_FILE() log level
| From: | Rasmus Lerdorf | Date: | Fri, 28 Sep 2001 23:24:12 +0000 |
| Subject: | Re: IS_FILE() log level | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-66804@lists.php.net to get a copy of this message | ||
Well, file_exists() is designed to check that without a warning.
is_file() checks to see if the file is a regular file. Since we cache the
stat struct, calling one after another is ok.
Could still be that this should be an E_NOTICE. Derick changed this in
response to this bug report: http://bugs.php.net/bug.php?id=10856
CVS commit is here:
http://cvs.php.net/diff.php/php4/ext/standard/filestat.c?r1=1.64&r2=1.65&f=h
-Rasmus
On Fri, 28 Sep 2001, Mike Rogers wrote:
> It seems that is_file() is returning it's 'stat failed' at WAY too high of a
> log level. That should be classified as a notice and should truly not be
> displayed (as the entire point of IS_FILE is to check if it is a file, as it
> may not exist. The default setting for log level is E_ALL & ~E_NOTICE...
> So maybe put it in the notice section. That seems to have changed since the
> upgrade to the current CVS from 4.0.6.
> " stat failed for /tmp/testfile.tmp (errno=2 - No such file or
> directory) "
> --
> Mike
>
>