From: Michael J. Rubinsky Date: Wed, 12 Jan 2011 19:44:50 +0000 (-0500) Subject: Log the query when throwing this error X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=006e9be94529c26012c79d9e384b10f23cf675cc;p=horde.git Log the query when throwing this error --- diff --git a/framework/Db/lib/Horde/Db/Adapter/Base.php b/framework/Db/lib/Horde/Db/Adapter/Base.php index 2cffb21b8..ceebb97aa 100644 --- a/framework/Db/lib/Horde/Db/Adapter/Base.php +++ b/framework/Db/lib/Horde/Db/Adapter/Base.php @@ -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 index 000000000..ef752b0b0 --- /dev/null +++ b/framework/Db/test/Horde/Db/Adapter/Mysql/conf.php @@ -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 index 000000000..ef752b0b0 --- /dev/null +++ b/framework/Db/test/Horde/Db/Adapter/Postgresql/conf.php @@ -0,0 +1 @@ +conf.php \ No newline at end of file