Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

QuoteValueList for MySql platform fails with multiple empty values. #6838

Closed
OakBehringer opened this issue Nov 3, 2014 · 3 comments
Closed
Assignees
Milestone

Comments

@OakBehringer
Copy link

$db = new \Zend\Db\Adapter\Adapter(array(
    'driver' => 'Pdo',
    'dsn' => 'mysql:dbname=;host='
));

print_r(array(
    $db->platform->quoteValue(null),
    $db->platform->quoteValue(''),
    $db->platform->quoteValueList(array('', null, '', null, '')),
    $db->platform->quoteValueList(array('', '', '')),

));

prints:

Array
(
    [0] => ''
    [1] => ''
    [2] => '', , , , 
    [3] => '', , 
)

You can see that the value list for indexes #2 and 3 are incorrect, only the first values are escaped.

@OakBehringer
Copy link
Author

Pull request created for hotfix.

#6839

@turrsis
Copy link
Contributor

turrsis commented Nov 19, 2014

This is fixed here 01b9000

@Ocramius
Copy link
Member

As @turrsis explained, this was fixed on merge in #5683, though you may still add a test case to prevent a regression (I didn't test this particular bug, I just removed weird looping logic)

@Ocramius Ocramius modified the milestones: 2.3.4, 2.4.0 Nov 19, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants