ZF2-514: Fatal error thrown when accessing merge method on non-existing object
Description
A fatal error is thrown on line 576 of \Zend\Db\Sql\Select.php when trying to use Expr in a join, such as:
->join(
array('u' => 'users'),
'othertable.originator_id = u.id',
array('person' => new Expr("IF(u.id = 1, NULL, u.username)"))
)
Comments
Posted by Andrew Collington (amnuts) on 2012-09-01T19:48:14.000+0000
Forgot to mention that line 576 just needs to have a check for $parameterContainer being non-empty, such as:
Posted by Koen Pieters (koen) on 2012-09-03T09:50:20.000+0000
Send a pull request for this: https://github.com/zendframework/zf2/pull/2291
Posted by Ralph Schindler (ralph) on 2012-09-04T19:11:08.000+0000
Fixed with @koen's patch.