php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #40164 filetype() generates wrong error message type
Submitted: 2007-01-19 09:44 UTC Modified: 2007-01-19 10:04 UTC
From: pcdinh at gmail dot com Assigned:
Status: Not a bug Package: Compile Warning
PHP Version: 5.2.0 OS: Windows
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: pcdinh at gmail dot com
New email:
PHP Version: OS:

 

 [2007-01-19 09:44 UTC] pcdinh at gmail dot com
Description:
------------
The PHP Manual said: filetype() will also produce an E_NOTICE message if the stat call fails or if the file type is unknown.

However, in fact, with PHP 5.2.0, Windows Xp Sp2, a E_WARNING message is returned:
Warning: filetype() [function.filetype]: Lstat failed for W:/ in D:\wvbsrc\mailing\demos\lib\core\WVB\View\Drivers\WVB_View_Standard.php on line 73


Reproduce code:
---------------
if (filetype('W:/') === false)
{
	echo "Hello";
}

Expected result:
----------------
Notice: filetype() [function.filetype]: Lstat failed for W:/ in D:\wvbsrc\mailing\demos\lib\core\WVB\View\Drivers\WVB_View_Standard.php on line 73

Actual result:
--------------
Warning: filetype() [function.filetype]: Lstat failed for W:/ in D:\wvbsrc\mailing\demos\lib\core\WVB\View\Drivers\WVB_View_Standard.php on line 73

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-01-19 10:04 UTC] tony2001@php.net
The manual says of another one possible error message.
This error message is "Unknown file type (..)" and it's indeed E_NOTICE.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 11:01:27 2024 UTC