From e4758cb4f546cec4cba394c5e3578b4263b7e8d9 Mon Sep 17 00:00:00 2001 From: Dries Buytaert <dries@buytaert.net> Date: Fri, 21 Aug 2009 16:36:35 +0000 Subject: [PATCH] - Patch #555446 by deekayen: remove backward-compatibility hacks from arg processing. --- includes/database/database.inc | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/includes/database/database.inc b/includes/database/database.inc index 946a495dc911..22bd8fe2ef54 100644 --- a/includes/database/database.inc +++ b/includes/database/database.inc @@ -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]; - break; - case 'f': - $args[$idx] = (float) $args[$idx]; - break; - } - } - } - return array($query, $args, $options); } -- GitLab