Fatal error: Call to a member function log()

Back to PHP-IRC Support

Page: 1  
From User Message Body
dracozny
Post #1028
Member
Date: 12:49 am, Apr 6 2010
Posts: 30


exact error
Code

PHP Notice:  Undefined property: bot::$ircClass in /home/ellipse32/php-irc-2.2.1/bot.php on line 136
PHP Fatal error:  Call to a member function log() on a non-object in /home/ellipse32/php-irc-2.2.1/bot.php on line 136


I assume its an error in my code but this error disappeared for a long time then suddenly came back this last week.

my code thats executed at the time of the event:

commmand:
Code
!markethours

conf file
Code
priv    !markethours true true true 0 clockworx_mod markethours

php file:
Code
        public function markethours($line, $args) 
    {
        if(isset($args['arg1']))
        {
            $timezone = $args['query'];
        }
        else
        {
            $timezone = 'UTC';
            $this->ircClass->notice($line['fromNick'], 'No City/Timezone specified using UTC instead');
            $this->ircClass->notice($line['fromNick'], 'You can specify a timezone city example: !marketstat London');
        }
        $date = $this->gettimezone($timezone, NULL);
        $this->ircClass->notice($line['fromNick'], 'Current Time in '. $date->getTimezone()->getName(). ' is ' .$date->format('Y-m-d G:i'));
        $this->timeconvert('Sydney', $line, $timezone);
        $this->timeconvert('Tokyo', $line, $timezone);
        $this->timeconvert('Hong Kong', $line, $timezone);
        $this->timeconvert('Europe', $line, $timezone);
        $this->timeconvert('London', $line, $timezone);
        $this->timeconvert('New York', $line, $timezone);
        
    }



dracozny
Post #1029
Member
Date: 5:45 am, Apr 6 2010
Posts: 30


still wondering if this is a server issue of some sort. as it works fine on my machine, but it crashes on the server

dracozny
Post #1034
Member
Date: 6:20 pm, Apr 27 2010
Posts: 30


oddly this issue went away, again... only conclusion is it has to do with how centos deals with php updates.

   

Back to PHP-IRC Support