View Single Post
  #1  
Old 03-19-2017, 12:27 PM
Abronsyth's Avatar
Abronsyth Abronsyth is offline
A Headache Embodied
 
Join Date: Aug 2011
Location: NY
Posts: 1,011
Gender: Male
Credits: 114,173
Abronsyth is on a distinguished road
Default Function add on a non-object issue

Hey all, hoping someone more PHP savvy than myself can help out here.

I'm working on adding a new module to my theme and am basing it off of the other modules. Well, I am encountering an issue now in my class file.
Quote:
Fatal error: Call to a member function add() on a non-object in /home/teratria/public_html/classes/class_userbar.php on line 56
This is the script that it is struggling with;
PHP Code:
    protected function setUsercp(){
    
$mysidia Registry::get("mysidia");
        
$profile $mysidia->user->getprofile(); 
    
date_default_timezone_set("America/New_York");
    
$time date('h:i a');
        
//$this->UserCP->add(new Comment("<img src='http://teratria.x10host.com/images/theme/clock.png'/> {$time}"));
        
$profileLink = new Link("http://teratria.x10host.com/profile/view/{$mysidia->user->username}");
        
$profileLink->setText("<img src='http://teratria.x10host.com/images/theme/user.png'/> {$mysidia->user->username}");
        
$this->usercp->add($profileLink);
        
        
$this->setDivision($this->usercp);    
    } 
Is anyone able to see what I am doing wrong?
__________________
My Mods Site (1.3.4, 2020 Mods)
Reply With Quote