Professional Web Applications Themes

#40164 [NEW]: filetype() generates wrong error message type - PHP Bugs

From: pcdinh at gmail dot com Operating system: Windows PHP version: 5.2.0 PHP Bug Type: Compile Warning Bug description: filetype() generates wrong error message type 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\ ...

  1. #1

    Default #40164 [NEW]: filetype() generates wrong error message type

    From: pcdinh at gmail dot com
    Operating system: Windows
    PHP version: 5.2.0
    PHP Bug Type: Compile Warning
    Bug description: filetype() generates wrong error message type

    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

    --
    Edit bug report at [url]http://bugs.php.net/?id=40164&edit=1[/url]
    --
    Try a CVS snapshot (PHP 4.4): [url]http://bugs.php.net/fix.php?id=40164&r=trysnapshot44[/url]
    Try a CVS snapshot (PHP 5.2): [url]http://bugs.php.net/fix.php?id=40164&r=trysnapshot52[/url]
    Try a CVS snapshot (PHP 6.0): [url]http://bugs.php.net/fix.php?id=40164&r=trysnapshot60[/url]
    Fixed in CVS: [url]http://bugs.php.net/fix.php?id=40164&r=fixedcvs[/url]
    Fixed in release: [url]http://bugs.php.net/fix.php?id=40164&r=alreadyfixed[/url]
    Need backtrace: [url]http://bugs.php.net/fix.php?id=40164&r=needtrace[/url]
    Need Reproduce Script: [url]http://bugs.php.net/fix.php?id=40164&r=needscript[/url]
    Try newer version: [url]http://bugs.php.net/fix.php?id=40164&r=oldversion[/url]
    Not developer issue: [url]http://bugs.php.net/fix.php?id=40164&r=support[/url]
    Expected behavior: [url]http://bugs.php.net/fix.php?id=40164&r=notwrong[/url]
    Not enough info: [url]http://bugs.php.net/fix.php?id=40164&r=notenoughinfo[/url]
    Submitted twice: [url]http://bugs.php.net/fix.php?id=40164&r=submittedtwice[/url]
    register_globals: [url]http://bugs.php.net/fix.php?id=40164&r=globals[/url]
    PHP 3 support discontinued: [url]http://bugs.php.net/fix.php?id=40164&r=php3[/url]
    Daylight Savings: [url]http://bugs.php.net/fix.php?id=40164&r=dst[/url]
    IIS Stability: [url]http://bugs.php.net/fix.php?id=40164&r=isapi[/url]
    Install GNU Sed: [url]http://bugs.php.net/fix.php?id=40164&r=gnused[/url]
    Floating point limitations: [url]http://bugs.php.net/fix.php?id=40164&r=float[/url]
    No Zend Extensions: [url]http://bugs.php.net/fix.php?id=40164&r=nozend[/url]
    MySQL Configuration Error: [url]http://bugs.php.net/fix.php?id=40164&r=mysqlcfg[/url]
    pcdinh at gmail dot com Guest

  2. #2

    Default #40164 [Opn->Bgs]: filetype() generates wrong error message type

    ID: 40164
    Updated by: [email]tony2001php.net[/email]
    Reported By: pcdinh at gmail dot com
    -Status: Open
    +Status: Bogus
    Bug Type: Compile Warning
    Operating System: Windows
    PHP Version: 5.2.0
    New Comment:

    The manual says of another one possible error message.
    This error message is "Unknown file type (..)" and it's indeed
    E_NOTICE.


    Previous Comments:
    ------------------------------------------------------------------------

    [2007-01-19 09:44:57] 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


    ------------------------------------------------------------------------


    --
    Edit this bug report at [url]http://bugs.php.net/?id=40164&edit=1[/url]
    tony2001@php.net Guest

Similar Threads

  1. cffile - wrong file type error message
    By etman in forum Coldfusion - Advanced Techniques
    Replies: 2
    Last Post: April 6th, 02:33 AM
  2. #26051 [Opn->Bgs]: filetype() returns wrong type for device drivers
    By sniper@php.net in forum PHP Development
    Replies: 2
    Last Post: November 1st, 11:01 AM
  3. #26051 [Bgs]: filetype() returns wrong type for device drivers
    By six at t0x dot net in forum PHP Development
    Replies: 0
    Last Post: October 31st, 03:02 PM
  4. #26051 [Bgs->Opn]: filetype() returns wrong type for device drivers
    By six at t0x dot net in forum PHP Development
    Replies: 0
    Last Post: October 31st, 02:28 PM
  5. #26051 [NEW]: filetype() returns wrong type for device drivers
    By six at t0x dot net in forum PHP Development
    Replies: 0
    Last Post: October 31st, 11:08 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139