Only attempt callback if non-null

This commit is contained in:
Luke Fitzgerald 2010-08-04 08:46:04 -07:00
parent 4cfe04a68f
commit 2250273942

View File

@ -84,6 +84,7 @@ class Phergie_Plugin_Statusnet extends Phergie_Plugin_Abstract {
* @return void * @return void
*/ */
public function onNotice() { public function onNotice() {
if ($this->regCallback !== NULL) {
$event = $this->getEvent(); $event = $this->getEvent();
if ($event->getNick() == 'NickServ') { if ($event->getNick() == 'NickServ') {
$message = $event->getArgument(1); $message = $event->getArgument(1);
@ -96,4 +97,5 @@ class Phergie_Plugin_Statusnet extends Phergie_Plugin_Abstract {
} }
} }
} }
}
} }