#29412 [Opn->Csd]: quickref.php E_ALL fixes
| From: | goba@php.net | Date: | Tue, 03 Aug 2004 21:14:57 +0000 |
| Subject: | #29412 [Opn->Csd]: quickref.php E_ALL fixes | ||
| References: | 1 | Groups: | php.mirrors |
| Request: | Send a blank email to php-mirrors+get-25619@lists.php.net to get a copy of this message | ||
ID: 29412
Updated by: goba@php.net
Reported By: toni dot viemero at iki dot fi
-Status: Open
+Status: Closed
Bug Type: Website problem
Operating System: Irrelevant
PHP Version: 4.3.8
New Comment:
Patch applied, thanks.
Previous Comments:
------------------------------------------------------------------------
[2004-07-27 20:15:10] toni dot viemero at iki dot fi
Description:
------------
Calling quickref.php directly gives couple of thousand "Undefined
variable: notfound" rows in PHP.net mirrors error_log.
Here's a quick'n'dirty patch to fix it:
--- /home/www/php.selfdestruct.net/docs/quickref.php Mon Jan 19
19:13:12 2004
+++ quickref.php Tue Jul 27 21:12:03 2004
@@ -24,6 +24,11 @@
define("COLUMNS", 3);
define("SHOW_CLOSE", 20);
+// Set empty $notfound if called directly
+if (!isset($notfound)) {
+ $notfound = '';
+}
+
// Print out the table of found (or all) functions. The HTML comments
are
// needed to support MyCroft search (Mozilla browser family and
Sherlock for MacOSX)
function quickref_table($functions)
@@ -75,7 +80,7 @@
$functions[$entry] = $funcname;
// Compute similarity of the name to the requested one
- if (function_exists('similar_text') && $notfound) {
+ if (function_exists('similar_text') && !empty($notfound)) {
similar_text($funcname, $notfound, $p);
$temp[$entry] = $p;
}
@@ -117,7 +122,7 @@
<h1>PHP Function List</h1>
-<?php if ($notfound && count($maybe) > 0) { ?>
+<?php if (!empty($notfound) && count($maybe) > 0) { ?>
<p>
Sorry, but the function <b><?php echo htmlspecialchars($notfound);
?></b>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=29412&edit=1