View Single Post
  #19  
Old 02-09-2016, 10:41 PM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 333,922
Hall of Famer is on a distinguished road
Default

The issue is with this line:

PHP Code:
$gender $adopt->getGender(); 
The $adopt from item functions is not an instance of class OwnedAdoptable, but an instance of StdClass with properties of the same name as the database columns. This has a historical reason, as the model class for Adoptable and OwnedAdoptable were available after Mys v1.3.2, while item functions existed back since Mys v1.3.0.

So the fix is very simple, change this line to the code below:
PHP Code:
$gender $adopt->gender
Lemme know if it works.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote