Log the query when throwing this error
authorMichael J. Rubinsky <mrubinsk@horde.org>
Wed, 12 Jan 2011 19:44:50 +0000 (14:44 -0500)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Wed, 12 Jan 2011 19:45:28 +0000 (14:45 -0500)
framework/Db/lib/Horde/Db/Adapter/Base.php
framework/Db/test/Horde/Db/Adapter/Mysql/conf.php [new symlink]
framework/Db/test/Horde/Db/Adapter/Postgresql/conf.php [new symlink]

index 2cffb21..ceebb97 100644 (file)
@@ -736,6 +736,7 @@ abstract class Horde_Db_Adapter_Base implements Horde_Db_Adapter
     {
         $paramCount = substr_count($sql, '?');
         if (count($args) != $paramCount) {
+            $this->_logError('Parameter count mismatch: ' . $sql, 'Horde_Db_Adapter_Base::_replaceParameters');
             throw new Horde_Db_Exception('Parameter count mismatch');
         }
 
diff --git a/framework/Db/test/Horde/Db/Adapter/Mysql/conf.php b/framework/Db/test/Horde/Db/Adapter/Mysql/conf.php
new file mode 120000 (symlink)
index 0000000..ef752b0
--- /dev/null
@@ -0,0 +1 @@
+conf.php
\ No newline at end of file
diff --git a/framework/Db/test/Horde/Db/Adapter/Postgresql/conf.php b/framework/Db/test/Horde/Db/Adapter/Postgresql/conf.php
new file mode 120000 (symlink)
index 0000000..ef752b0
--- /dev/null
@@ -0,0 +1 @@
+conf.php
\ No newline at end of file