ID:               32234
 User updated by:  adrian at autopublish dot com
 Reported By:      adrian at autopublish dot com
 Status:           Bogus
 Bug Type:         Filesystem function related
 Operating System: Fedora Core 3
 PHP Version:      4.3.10
 New Comment:

Thanks.

I've posted a note to the is_file doc page:

http://www.php.net/manual/en/function.is-file.php
(will take some minutes to appear in all mirrors)


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

[2005-03-08 17:36:25] [EMAIL PROTECTED]

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

is_file and is_dir will resolve symlinks.

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

[2005-03-08 17:35:21] adrian at autopublish dot com

Description:
------------
The is_file() documentation page says:

  is_file -- Tells whether the filename is a regular file

If I pass a simbolic link to a file as parameter, the function returns
true. So my question is: Is a simbolic link a regular file? I think it
is not, so the result maybe a bug.


Extra info: The filetype() function returns "link".

Reproduce code:
---------------
Linux command line:

touch file
ln -s file link
echo '<? if (is_file("link")) echo "y\n"; ?>' | php -q

Expected result:
----------------
Nothing should be printed after last command.

Actual result:
--------------
"y" is printed, so the function is returning true.


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


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

Reply via email to