Ah i've got that too. :'o
Hmm maybe this will work?:
PHP Code:
public function getFavpet(){
if(is_numeric($this->favpet) && $this->favpet != 0){
$adopty = new OwnedAdoptable($this->favpet);
$favimg = $adopty->getImage();
$this->favpet = new Link("levelup/click/{$this->favpet}", new Image($favimg), TRUE);
}
elseif($this->favpet = 0) {
$this->favpet = new Comment("None Selected");
}
return $this->favpet;
}