Hi Admin,
on the save function in th MODEL:
function save($data)
{
$row = $this->getTable();
//Convert data from a stdClass
if (get_class($data) == 'stdClass')
$data = JArrayHelper::fromObject($data);
//Current id if unspecified
if ($data['id'] != null)
$id = $data['id'];
else if (($this->_id != null) && ($this->_id > 0))
$id = $this->_id;
and more specific on the line:
if (get_class($data) == 'stdClass')
sometimes I get this error:
Warning: get_class() expects parameter 1 to be object, array given in ROOT\administrator\components\MYCOMPONENT\models\ITEM.php on line 233
I solved it in this way:
if (is_object($data)) {
//Convert data from a stdClass
if (get_class($data) == 'stdClass')
$data = JArrayHelper::fromObject($data);
}