[pmwiki-users] PmWiki-generated warnings

Joachim Durchholz jo at durchholz.org
Sun Jun 26 04:04:32 CDT 2005


Hi all,

I just ran PmWiki through XDebug and found it's internally generating 
some warnings. Since that's obfuscating the things that I really want to 
see, I suggest to avoid them.

I'm using 2.0beta36 (the name servers for pmichaud.com and pmwiki.org 
were down, so I couldn't download and upgrade to the latest version).

In scripts/diag.php, function DisplayStopWatch():
The array_pop call generates a warning if $StopWatch isn't set. I.e. it 
should be rewritten as
   if (isset($StopWatch)) array_pop($StopWatch);
or
   if (is_array($StopWatch)) array_pop($StopWatch);
I'm not sure what this is supposed to do. As written it just removes the 
last measurement, which strikes me as strange (but maybe it serves a 
purpose).

(Aside note: the foreach line could be written as
   foreach((array)$StopWatch as $x)
since $k is never used.)



Regards,
Jo



More information about the pmwiki-users mailing list