Bug #12351 Updated: admin-notes.php has issues with edits.
| From: | jimw@php.net | Date: | Mon, 24 Sep 2001 02:44:51 +0000 |
| Subject: | Bug #12351 Updated: admin-notes.php has issues with edits. | ||
| References: | 1 | Groups: | php.mirrors |
| Request: | Send a blank email to php-mirrors+get-6646@lists.php.net to get a copy of this message | ||
ID: 12351
Updated by: jimw
Reported By: philip@cornado.com
Old Status: Open
Status: Closed
Bug Type: Website problem
Operating System: n/a
PHP Version: 4.0.6
New Comment:
this was fixed. (but admin-notes doesn't live there any more...)
Previous Comments:
------------------------------------------------------------------------
[2001-07-24 16:15:14] philip@cornado.com
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 this bug report at http://bugs.php.net/?id=12351&edit=1