Details
Description
In Zend_Db_Adapter_Abstract
public function quoteInto($text, $value, $type = null, $count = null) {
if ($count === null) {
return str_replace('?', $this->quote($value, $type), $text);
} else {
while ($count > 0) {
if (strpos($text, '?') != false) {
$text = substr_replace($text, $this->quote($value), strpos($text, '?'), 1);
}
--$count;
}
return $text;
}
}
In the line "if (strpos($text, '?') != false) {", it should be !== and not !=, since position returned can be 0.
Else,
$table->select()->where('? = id', 123); //sample taken from forum in which I first wrote about this
which is valid, won't work.
Nothing fancy, but I think it could affect some people =)
Patch for Zend_Db_Abstract and test case attached.