Does the pet you are looking at have a next level? For example, the maximum level I have on my test site for pets is level 4. If the pet is level 4, it has no next level, and therefore calling getNextLevel() would make the function, and therefore the variable holding the function, hold the value of FALSE, an empty value.
My recommended use of getNextLevel() would be something like:
PHP Code:
if($this->hasNextLevel()){
$level = $this->getNextLevel();
$levelupClicks = $this->getLevelupClicks();
$toNext = "(LVL ".$level->getLevel()." in ".$levelupClicks." more EXP)";
}
else $toNext = "(MAX)";
and then returning $toNext. But I'm dealing with v1.3.4, and I'm not sure how different things are. I'm currently doing the above in getStats(), another function in the ownedadoptables class.