Commit e4758cb4 authored by Dries's avatar Dries
Browse files

- Patch #555446 by deekayen: remove backward-compatibility hacks from arg processing.

parent b06e8d9c
......@@ -2528,25 +2528,6 @@ function _db_query_process_args($query, $args, $options) {
$args = array_values($args); // The old system allowed named arrays, but PDO doesn't if you use ?.
// A large number of queries pass FALSE or empty-string for
// int/float fields because the previous version of db_query()
// casted them to int/float, resulting in 0. MySQL PDO happily
// accepts these values as zero but PostgreSQL PDO does not, and I
// do not feel like tracking down and fixing every such query at
// this time.
if (preg_match_all('/%([dsfb])/', $old_query, $m) > 0) {
foreach ($m[1] as $idx => $char) {
switch ($char) {
case 'd':
$args[$idx] = (int) $args[$idx];
case 'f':
$args[$idx] = (float) $args[$idx];
return array($query, $args, $options);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment