|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-08-03 23:14 UTC] goba@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Tue Jun 16 10:00:01 2026 UTC |
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>