We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When a list parameter is bound to a query but the previous parameter types are omitted, the query gets processed incorrectly.
Steps to reproduce:
$query = 'SELECT NULL FROM dummy WHERE ? IN (?)'; $params = ['foo', ['foo', 'bar']]; $types = [1 => Connection::PARAM_STR_ARRAY]; list($query, $params, $types) = SQLParserUtils::expandListParameters($query, $params, $types);
Expected result:
$query = 'SELECT NULL FROM dummy WHERE ? IN (?, ?)'; $params = ['foo', 'foo', 'bar']; $types = [null, PDO::PARAM_STR, PDO::PARAM_STR];
Actual result:
Warning: array_merge(): Argument #2 is not an array in lib/Doctrine/DBAL/SQLParserUtils.php on line 136
$query = 'SELECT NULL FROM dummy WHERE ? IN (?)'; // not modified, invalid $params = null; // invalid $types = [PDO::PARAM_STR]; // invalid
The text was updated successfully, but these errors were encountered:
Closed via #3894.
Sorry, something went wrong.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
morozov
Successfully merging a pull request may close this issue.
When a list parameter is bound to a query but the previous parameter types are omitted, the query gets processed incorrectly.
Steps to reproduce:
Expected result:
Actual result:
The text was updated successfully, but these errors were encountered: