Hey there,
I got a structure field holding some values, and of course autoid as described in the wiki. From a select field (storing autoid as value), I select some stuff and get on with my life.
class StuffPage extends Page
{
public function stuff()
{
$stuff = autoid($page->stuff()->value);
return $stuff->name();
}
}
.. instead it throws Call to a member function name() on null - I don't get it because when var_dumping the result, it's shown to be a StructureObject :confused:
Hey there, I got a structure field holding some values, and of course
autoid
as described in the wiki. From a select field (storingautoid
as value), I select some stuff and get on with my life.Now, inside a controller, calling this works:
.. but inside
model.php
, this doesn't:.. instead it throws
Call to a member function name() on null
- I don't get it because whenvar_dump
ing the result, it's shown to be aStructureObject
:confused: