ZF-3437: misleading exception message for zend db statement parameters

Description

I switched an adapter from pdo to mysqli and this triggered an exception: Zend_Db_Statement_Exception' with message 'Invalid bind-variable position ':status'

I looked at the source of Zend_Db_Statement and discovered that Mysqli just doesn't support named parameters. Could the message be changed so it's clear what the problem is?


if ($this->_adapter->supportsParameters('positional') === false) {
...
   throw new Zend_Db_Statement_Exception("Invalid bind-variable position '$val'");
...
if ($this->_adapter->supportsParameters('named') === false) {
...
   throw new Zend_Db_Statement_Exception("Invalid bind-variable position '$val'");

The same exception is also thrown in situation where quotes are not stripped properly, @see ZF-3025, which makes it even more confusing.

Cheers

Comments

Solved in rSVN11116