goba Mon Dec 20 10:56:01 2004 EDT
Modified files:
/phpdoc/scripts/quickref prefixcompress.php processafter.php
Log:
silence some PHP notices
http://cvs.php.net/diff.php/phpdoc/scripts/quickref/prefixcompress.php?r1=1.3&r2=1.4&ty=u
Index: phpdoc/scripts/quickref/prefixcompress.php
diff -u phpdoc/scripts/quickref/prefixcompress.php:1.3
phpdoc/scripts/quickref/prefixcompress.php:1.4
--- phpdoc/scripts/quickref/prefixcompress.php:1.3 Wed Dec 31 19:35:41 2003
+++ phpdoc/scripts/quickref/prefixcompress.php Mon Dec 20 10:56:01 2004
@@ -16,7 +16,7 @@
| Authors: Mitja Slenc <[EMAIL PROTECTED]> |
+----------------------------------------------------------------------+
- $Id: prefixcompress.php,v 1.3 2004/01/01 00:35:41 goba Exp $
+ $Id: prefixcompress.php,v 1.4 2004/12/20 15:56:01 goba Exp $
*/
$funcs=file("funclist.txt");
@@ -62,7 +62,7 @@
return ($cache[$key]=$result);
}
}
- if ($list[0][0]!=$list[1][0] || ($list[0][1]!=$list[1][1] &&
$list[2][0]!=$list[0][0])) {
+ if (@($list[0][0]!=$list[1][0] || ($list[0][1]!=$list[1][1] &&
$list[2][0]!=$list[0][0]))) {
$result.=array_shift($list);
continue;
}
@@ -75,7 +75,7 @@
$tmplist=$list;
$prefix=array_shift($tmplist);
$subs=array();
- while (substr($tmplist[0],0,strlen($prefix))==$prefix) {
+ while (@substr($tmplist[0],0,strlen($prefix))==$prefix)
{
$subs[]=substr(array_shift($tmplist),strlen($prefix));
}
$tmpresult=$prefix."[";
http://cvs.php.net/diff.php/phpdoc/scripts/quickref/processafter.php?r1=1.9&r2=1.10&ty=u
Index: phpdoc/scripts/quickref/processafter.php
diff -u phpdoc/scripts/quickref/processafter.php:1.9
phpdoc/scripts/quickref/processafter.php:1.10
--- phpdoc/scripts/quickref/processafter.php:1.9 Sun Jan 25 05:36:52 2004
+++ phpdoc/scripts/quickref/processafter.php Mon Dec 20 10:56:01 2004
@@ -16,7 +16,7 @@
| Authors: Mitja Slenc <[EMAIL PROTECTED]> |
+----------------------------------------------------------------------+
- $Id: processafter.php,v 1.9 2004/01/25 10:36:52 goba Exp $
+ $Id: processafter.php,v 1.10 2004/12/20 15:56:01 goba Exp $
*/
$lines = file("originalafter.js");
@@ -86,8 +86,9 @@
if ($line[0]=="\"" || $line[0]=="'") continue;
preg_match_all("/[a-zA-Z_][a-zA-Z0-9_]*/", $line, $matches);
if (sizeof($matches[0]))
- foreach($matches[0] as $id)
- $ids[$id]++;
+ foreach($matches[0] as $id) {
+ $ids[$id] = (isset($ids[$id]) ? $ids[$id] + 1 : 1);
+ }
}
foreach($leave as $toremove)