Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#17 defines.php bug

open
nobody
None
5
2007-05-04
2007-05-04
Anonymous
No

If this library is included within a function (not in a global context), then the defines.php values are not added as global variables and then not read by the message handler.
This causes every message from the irc server to be unrecognized because the message array is always empty.

I know that usually a library shouldn't be included from within a function, but thats what people do, and it takes hours to figure out that it causes messages to become unrecognized.

A simple fix:

defines.php Line 235

if(!isset($GLOBALS['SMARTIRC_replycodes']))
$GLOBALS['SMARTIRC_replycodes'] = &$SMARTIRC_replycodes;
if(!isset($GLOBALS['SMARTIRC_nreplycodes']))
$GLOBALS['SMARTIRC_nreplycodes'] = &$SMARTIRC_nreplycodes;

-Ari

Discussion