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
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

Pull Requests

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: Mon Dec 30 14:01:28 2024 UTC