ZF2-514: Fatal error thrown when accessing merge method on non-existing object


A fatal error is thrown on line 576 of \Zend\Db\Sql\Select.php when trying to use Expr in a join, such as:

    array('u' => 'users'),
    'othertable.originator_id =',
    array('person' => new Expr("IF( = 1, NULL, u.username)"))


Forgot to mention that line 576 just needs to have a check for $parameterContainer being non-empty, such as:

if ($parameterContainer) {

Send a pull request for this:

Fixed with @koen's patch.