From:             [EMAIL PROTECTED]
Operating system: FreeBSD 4.3
PHP version:      4.1.0
PHP Bug Type:     Filesystem function related
Bug description:  is_file returns an error rather than if a file exists or not

<?php
        if(is_file($_GET['file'].".php")) { include($_GET['file'].".php"); }
        elseif(is_file($_GET['focus'].".inc")) { virtual($_GET['focus'].".inc");
}
        else { virtual("news/news.inc"); }
?>

That code throws this error:

Warning: stat failed for .php (errno=2 - No such file or directory) in
/usr/home/edgewww/helpandsupport.net/cs/htdocs/index.php on line 39

Warning: stat failed for .inc (errno=2 - No such file or directory) in
/usr/home/edgewww/helpandsupport.net/cs/htdocs/index.php on line 40

I've corrected this issue by using file_exists but for the sake of not
having to change my backend, I'd love for is_file to start working again.
-- 
Edit bug report at: http://bugs.php.net/?id=14741&edit=1


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to