You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This produces the following error: ErrorException [ 4096 ]: Argument 1 passed to Orm\Query::_parse_where_array() must be an array, string given, called in /fuel/packages/orm/classes/query.php on line 478 and defined
This is a sample that was found to work:
$query->related('author', array('where' => array('active' => 1)));
Options for fixing per Harro:
"As things stand at the moment, it's a typo, and the code expects your second example.
But in my opinion this is incorrect, as that syntax doesn't allow you to insert a where clause other then "is equal". Which means the code needs to be adapted to accept what is documented."
The text was updated successfully, but these errors were encountered:
Originally posted on the Fuel forums(http://fuelphp.com/forums/discussion/11719/query-related-calls#Item_1):
In the documentation (http://fuelphp.com/docs/packages/orm/crud.html) there is a broken sample call:
Model_Article::query()->related('author', array('where' => array('active', '=', 1)));
This produces the following error: ErrorException [ 4096 ]: Argument 1 passed to Orm\Query::_parse_where_array() must be an array, string given, called in /fuel/packages/orm/classes/query.php on line 478 and defined
This is a sample that was found to work:
$query->related('author', array('where' => array('active' => 1)));
Options for fixing per Harro:
"As things stand at the moment, it's a typo, and the code expects your second example.
But in my opinion this is incorrect, as that syntax doesn't allow you to insert a where clause other then "is equal". Which means the code needs to be adapted to accept what is documented."
The text was updated successfully, but these errors were encountered: