ZF-5675: Zend_Db_Statement_Mysqli and Zend_Validate_Db_* problems with strict typing on fetch
Description
Zend_Db_Adapter_Mysqli does not return consistent null for failed matches using fetch() from the statement class due to // fetch the next result $retval = $this->_stmt->fetch(); switch ($retval) { case null: // end of data case false: // error occurred $this->_stmt->reset(); return $retval; default: // fallthrough }
it should return false like every other class if it is going to work with zend_validate_db_*'s if ($result !== false) {
Comments
Posted by Ryan Mauger (bittarman) on 2009-02-09T11:38:21.000+0000
After discussion with Ralph Schindler, the strict equality checking has been changed in commit 14028
Posted by Thomas Weidner (thomas) on 2009-02-10T14:30:09.000+0000
Erasing Zend_Validate_* as there is actually no DB validator in core.
Posted by Ralph Schindler (ralph) on 2009-09-17T08:08:49.000+0000
After discussing with [~bittarman] we should return false as the $retval for consistency with other adapters. Null has no real semantic meaning in Zend_Db_Statement.
Evaluating and assigning to [~bittarman]
Posted by Ryan Mauger (bittarman) on 2009-09-17T14:01:37.000+0000
commited to 1.9 release branch in r18195