php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #12351 admin-notes.php has issues with edits.
Submitted: 2001-07-24 16:15 UTC Modified: 2001-09-23 22:44 UTC
From: philip at cornado dot com Assigned:
Status: Closed Package: Website problem
PHP Version: 4.0.6 OS: n/a
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
36 - 6 = ?
Subscribe to this entry?

 
 [2001-07-24 16:15 UTC] philip at cornado dot 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";
}

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-09-23 22:44 UTC] jimw@php.net
this was fixed. (but admin-notes doesn't live there any more...)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 07:01:29 2024 UTC