Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Hydrate() error with Model_Temporal
  • I keep getting the following error when trying to retrieve records using the Model_Temporal::find(). Using fuel 1.8:
    Runtime Notice!ErrorException [ Runtime Notice ]: Declaration of Orm\Query_Temporal::hydrate() should be compatible with Orm\Query::hydrate(&$row, $models, stdClass $result, $model = NULL, $select = NULL, $primary_key = NULL).../fuel/packages/orm/classes/query/temporal.php @ line 81:However, the query runs, doing what I expect.  Here's the query (In my model that extends Orm\Model_Temporal):
    return self::find('all', array('where' => array('project_id' => $project_id),
    'related' => 'outline_type',
    'order_by' => array('outline_type_id' => 'asc',
    'parent_id' => 'asc',
    'print_order' => 'asc')));
  • HarroHarro
    Accepted Answer
    This happens in recent PHP versions when E_STRICT is enabled.

    Can you replace it by

    public function hydrate(&$row, $models, \stdClass $result, $model = null, $select = null, $primary_key = null)

    and let me know if that solves the problem? I'm on the road at the moment, not in a position to test.
  • That fixed it, thanks!

    Will this be patched in an upcoming version?
  • HarroHarro
    Accepted Answer
    Yup, now that you confimed it, I'll commit it.
  • thanks again
  • Seems this was fixed for 1.9, is there a release date for that?  Any chance it would be fixed for 1.8?
  • There's a hotfix backport in the planning for 1.8, probably sometime next week.
    You can then run a composer update to pull in the fixes.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion