From:             [EMAIL PROTECTED]
Operating system: Windows 98
PHP version:      4.0.6
PHP Bug Type:     Filesystem function related
Bug description:  filetype function not working for non-existant files

Regression error from 4.0.5 to 4.0.6. Looks like using filetype on a
non-existant file, returns the value of the last valid call. Seen on the
pre-compiled win32 flavour download with all modules.

<?php
echo filetype("c:/zzzzzz.zzz");
echo filetype("c:/");
echo filetype("c:/zzzzzz.zzz");
?>

Produces 

<br>
<b>Warning</b>:  Unknown file type (0) in <b>-</b> on line <b>2</b><br>
unknowndirdir

on 4.0.6. The file zzzzzzz.zzz does not exist. 4.0.5 returns dir with no
warning.

clearstatcache() has no effect. Have to explicitly check for file existance
with file_exists under this release.
-- 
Edit bug report at: http://bugs.php.net/?id=11984&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]

Reply via email to