From:             patric at liefdeis dot com
Operating system: FreeBSD 4.3
PHP version:      4.3.3
PHP Bug Type:     *General Issues
Bug description:  Is_Dir() gives warning

Description:
------------
When I run is_dir() on FreeBSD 4.3, and the file I check is not a dir, I
get a warning, about that the file is not a dir (duh, that is what I am
checking for :p). On Windows systems I don't have this problem.
Temporary solved the problem by using @is_dir(). But I believe it is not
very logic.

Reproduce code:
---------------
if (is_dir("file.txt")) {
  echo "This shouldn't be a dir";
} else {
  echo "burp";
}

Expected result:
----------------
burp

Actual result:
--------------
Warning: is_dir(): Stat failed for /www/site/file.txt (errno=20 - Not a
directory) in /www/site on line 1
burp

-- 
Edit bug report at http://bugs.php.net/?id=25343&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=25343&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=25343&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=25343&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=25343&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=25343&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=25343&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=25343&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=25343&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=25343&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=25343&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=25343&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25343&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=25343&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=25343&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=25343&r=gnused

Reply via email to