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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: philip at cornado dot com
New email:
PHP Version: OS:

 

 [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: Fri Apr 26 14:01:29 2024 UTC