ZF-5204: Using fetchCol on result where first item is empty results in empty array

Issue Type: Bug Created: 2008-12-10T14:17:06.000+0000 Last Updated: 2011-08-20T15:08:44.000+0000 Status: Resolved Fix version(s): - 1.8.3 (09/Jun/09)

Reporter: Gordon Forsythe (baohx) Assignee: Satoru Yoshida (satoruyoshida) Tags: - Zend_Db

Related issues: - ZF-2112



select distinct x from y yields an empty array if the data in the first field returned is an empty string. Example data ['',1,2,3].


Posted by Francois (f.verry) on 2009-03-25T06:55:09.000+0000

Problem occurs at Zend/Db/Statement.php 328: while ($val = $this->fetchColumn($col)) {

Since fetchColumn returns false when there is no more results (and false cannot be an SQL value), the following corrects the problem. 328: while (false !== ($val = $this->fetchColumn($col))) {

Posted by old of Satoru Yoshida ( on 2009-05-12T05:39:42.000+0000

It duplicates ZF-2112

Have you found an issue?

See the Overview section for more details.


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

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