Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

#25343 [Opn->Csd]: Is_Dir() gives warning

2 views
Skip to first unread message

sni...@php.net

unread,
Sep 1, 2003, 9:23:42 PM9/1/03
to
ID: 25343
Updated by: sni...@php.net
Reported By: patric at liefdeis dot com
-Status: Open
+Status: Closed
-Bug Type: *General Issues
+Bug Type: Filesystem function related
Operating System: FreeBSD 4.3
PHP Version: 4.3.3
New Comment:

This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.

In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.

Thank you for the report, and for helping us make PHP better.


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

[2003-09-01 08:20:59] patric at liefdeis dot com

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 this bug report at http://bugs.php.net/?id=25343&edit=1

0 new messages