#47511 [Opn->Csd]: undocumented: is_dir() returns true for symbolic links to directories

From: Date: Fri, 27 Feb 2009 16:05:27 +0000
Subject: #47511 [Opn->Csd]: undocumented: is_dir() returns true for symbolic links to directories
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-1921@lists.php.net to get a copy of this message
 ID:               47511
 Updated by:       kalle@php.net
 Reported By:      moquist at majen dot net
-Status:           Open
+Status:           Closed
 Bug Type:         Documentation problem
 Operating System: linux
 PHP Version:      Irrelevant
 New Comment:

This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

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




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

[2009-02-26 15:04:56] moquist at majen dot net

Description:
------------
If is_dir() wants to return true for symbolic links to directories
that's fine, but this should be mentioned in the documentation.

Cheers!
--matt

Reproduce code:
---------------
<?php
    symlink('/etc/', '/tmp/imalink');
    if (is_dir('/tmp/imalink')) {
        print "Hmm. I think /tmp/imalink is a directory! The usually
excellent documentation at php.net didn't help me expect this result.
:(";
    } else {
        print "I think /tmp/imalink is not a directory, which is what I
would expect to be the case since I know it's a symlink.";
    }   
?>


Expected result:
----------------
I think /tmp/imalink is not a directory, which is what I would expect
to be the case since I know it's a symlink.

Actual result:
--------------
Hmm. I think /tmp/imalink is a directory! The usually excellent
documentation at php.net didn't help me expect this result. :(


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


-- 
Edit this bug report at http://bugs.php.net/?id=47511&edit=1



Thread (2 messages)

« previous php.doc.bugs (#1921) next »