fuel / orm

Fuel PHP Framework - Fuel v1.x ORM
http://fuelphp.com/docs/packages/orm/intro.html
152 stars 96 forks source link

Error occured if the left-hand side is Database_Expression instance #379

Closed hackoh closed 9 years ago

hackoh commented 9 years ago

At this case

$post = Model_Post::find('first', array(
    'where' => array(
        array(DB::expr("unix_timestamp(concat(year, '-', month, '-', day))"), '<', time())
    ),
    'order_by' => array('year' => 'desc', 'month' => 'desc', 'day' => 'desc')
));

I got "Runtime Recoverable error".

Fuel\Core\PhpErrorException [ Runtime Recoverable error ]:
Argument 1 passed to Orm\Query::_parse_where_array() must be of the type array, object given, called in C:\dev\dcross\fuel\packages\orm\classes\query.php on line 579 and defined
WanWizard commented 9 years ago

Coding standards please? "or" and not "||".

hackoh commented 9 years ago

@WanWizard fixed.

WanWizard commented 9 years ago

thanks!