ZF-5675: Zend_Db_Statement_Mysqli and Zend_Validate_Db_* problems with strict typing on fetch

Issue Type: Bug Created: 2009-02-02T20:17:23.000+0000 Last Updated: 2009-09-17T14:01:37.000+0000 Status: Resolved Fix version(s): - 1.9.3 (22/Sep/09)

Reporter: Geoffrey Tran (potatobob) Assignee: Ryan Mauger (bittarman) Tags: - Zend_Db

Related issues: Attachments:


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) {


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

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.