zendframework/zend-db

BC break \Zend\Db\ResultSet\ResultSet::current

Closed this issue · 1 comments

GeeH commented

This issue has been moved from the zendframework repository as part of the bug migration program as outlined here - http://framework.zend.com/blog/2016-04-11-issue-closures.html


Original Issue: https://api.github.com/repos/zendframework/zendframework/issues/7675
User: @netroby
Created On: 2016-02-23T03:54:01Z
Updated At: 2016-03-07T02:08:50Z
Body
The \Zend\Db\ResultSet\ResultSet::current now return null if not found any result. before it return false.

at least 2.5.1 it return false.

our project upgrade failed due to this BC Break


Comment

User: @samsonasik
Created On: 2016-03-02T07:05:17Z
Updated At: 2016-03-02T07:05:17Z
Body
checking data not found should use $resultSet->count() === 0 instead imo. anyway, the old way that it return false is not right, based on the docblock:

    /**
     * @return array|\ArrayObject|null
     */

the behaviour on ^2.5 is expected as the docblock signature, close-able.