get_class() expects parameter 1 to be object, null given
c:/test/fuel/packages/orm/classes/model.php @ line 2195
line 2195:
if ( ! in_array(get_class($rel), static::$to_array_references))
The fix I made:
if (is_null($rel))
{
$array[$name] = null;
}
else
{
if ( ! in_array(get_class($rel), static::$to_array_references))
static::$to_array_references[] = get_class($rel);
$array[$name] = $rel->to_array($custom, true, $eav);
array_pop(static::$to_array_references);
}
}
Fuel\Core\PhpErrorException [ Warning ]:
get_class() expects parameter 1 to be object, boolean given
2179 $array[$name] = null;
2180 }
2181 elseif (is_array($rel))
2182 {
2183 $array[$name] = array();
2184 if ( ! in_array(get_class(reset($rel)), static::$to_array_references))
2185 {
2186 static::$to_array_references[] = get_class(reset($rel));
2187 foreach ($rel as $id => $r)
2188 {
2189 $array[$name][$id] = $r->to_array($custom, true, $eav);
if ( ! empty($rel) && ! in_array(get_class(reset($rel)), static::$to_array_references))
It looks like you're new here. If you want to get involved, click one of these buttons!