Bug #12351: admin-notes.php has issues with edits.
| From: | philip at cornado dot com | Date: | Tue, 24 Jul 2001 20:15:14 +0000 |
| Subject: | Bug #12351: admin-notes.php has issues with edits. | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-5698@lists.php.net to get a copy of this message | ||
From: philip@cornado.com
Operating system: n/a
PHP version: 4.0.6
PHP Bug Type: Website problem
Bug description: admin-notes.php has issues with edits.
After editing a user note in online manual, I was/am redirected to
admin-notes.php and the following is one of the errors that exists :
Warning: stat failed for function.function.print.php.php (errno=2 - No such
file or directory) in /local/Web/sites/phpweb/include/layout.inc on line
346
Of course, despite these Warnings, the edit succeeds. I didn't realize
is_file creates such Warnings, maybe this should be a bug report for
is_file? Or, turn down your error_reporting level :-)
error_reporting(E_ALL);
if (is_file('idontexist.php')) // creates warning
if (file_exists('idontexist.php')) // no warning
Regards,
Philip
from layout.inc
function sect_to_file($string) {
$string = strtolower($string);
$string = str_replace(' ','-',$string);
$string = str_replace('_','-',$string);
$func = "function.$string.php";
$chap = "ref.$string.php";
$feat = "features.$string.php";
$struct = "control-structures.$string.php";
if(is_file($func)) return $func; // line #346
else if(is_file($chap)) return $chap;
else if(is_file($feat)) return $feat;
else if(is_file($struct)) return $struct;
else return "$string.php";
}
--
Edit bug report at: http://bugs.php.net/?id=12351&edit=1