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

After discussion with Ralph Schindler, the strict equality checking has been changed in commit 14028

Erasing Zend_Validate_* as there is actually no DB validator in core.

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]

commited to 1.9 release branch in r18195