summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-08-21 16:36:35 +0000
committerDries Buytaert <dries@buytaert.net>2009-08-21 16:36:35 +0000
commite4758cb4f546cec4cba394c5e3578b4263b7e8d9 (patch)
tree77b36ffdf2e045e1d71536c03636c22efb0ca92b /includes
parentb06e8d9caad8dcb4a2647e8f1e624c52ec106cbe (diff)
downloadbrdo-e4758cb4f546cec4cba394c5e3578b4263b7e8d9.tar.gz
brdo-e4758cb4f546cec4cba394c5e3578b4263b7e8d9.tar.bz2
- Patch #555446 by deekayen: remove backward-compatibility hacks from arg processing.
Diffstat (limited to 'includes')
-rw-r--r--includes/database/database.inc19
1 files changed, 0 insertions, 19 deletions
diff --git a/includes/database/database.inc b/includes/database/database.inc
index 946a495dc..22bd8fe2e 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);
}