#11984 [Bgs->Opn]: filetype function not working for non-existant files

From: Date: Wed, 14 Aug 2002 09:35:56 +0000
Subject: #11984 [Bgs->Opn]: filetype function not working for non-existant files
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-16747@lists.php.net to get a copy of this message
ID: 11984 User updated by: JSaunders@edis.co.uk Reported By: JSaunders@edis.co.uk -Status: Bogus +Status: Open Bug Type: Filesystem function related Operating System: Windows 98 PHP Version: 4.0.6 New Comment: Tested this on 4.2.2 bug is still there. Would have fixed it myself but there was masses of change in the code that handles filetype between 4.0.5 and 4.0.6. Better to look at the problem than arbitarily close entries more than n months old. The example isn't rocket science to retest. Remember 4.0.6 was the current release when I raised the bug! Thanks Previous Comments: ------------------------------------------------------------------------ [2002-08-13 23:54:09] iliaa@php.net Thank you for taking the time to report a problem with PHP. Unfortunately you are not using a current version of PHP -- the problem might already be fixed. Please download a new PHP version from http://www.php.net/downloads.php If you are able to reproduce the bug with one of the latest versions of PHP, please change the PHP version on this bug report to the version you tested and change the status back to "Open". Again, thank you for your continued support of PHP. ------------------------------------------------------------------------ [2001-07-09 13:12:08] JSaunders@edis.co.uk 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 this bug report at http://bugs.php.net/?id=11984&edit=1

« previous php.bugs (#16747) next »