Check if values are set in Zend\Db\Sql\Insert.php for prepared statement #3849

merged 3 commits into from Mar 13, 2013

3 participants


Check if values are set in Send\Db\Sql\Insert

Fixes code for..

$columns = array('title', 'description');
$values = array(
$insert = $sql->insert()->columns($columns);
$stmt = $sql->prepareStatementForSqlObject($insert);            

Issue here:
Zend Framework member

@Mech7 Thank you for your pull request. Could you please also add a unit test that demonstrates the new behavior and therewith preventing regressions? Thanks!

=> Assigning to @ralphschindler cause he knows every little detail about zend\db.


Ok I will try I am not an expert at unit testing, I cannot replicate it with the mock object that the test is currently using.

Zend Framework member

@Mech7 That's no problem at all! If you feel you need help, please feel free to join us on IRC on, alternatively you could send a mail to the cr team ( zf-crteam [at] zend ) for some assistance.


@Freeaqingme Thanks but i figured it out I think :) Hope this is ok.. you can see it will throw some notices when running the test without the fix.

@ralphschindler ralphschindler merged commit c1a7f89 into zendframework:master Mar 13, 2013

1 check passed

Details default The Travis build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment