Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Initializing a result set with empty array produces warning on PHP 7.2 #295

Closed
hschletz opened this issue Dec 18, 2017 · 3 comments · Fixed by #303
Closed

Initializing a result set with empty array produces warning on PHP 7.2 #295

hschletz opened this issue Dec 18, 2017 · 3 comments · Fixed by #303
Milestone

Comments

@hschletz
Copy link
Contributor

This produces a warning on PHP 7.2:

$input = array(); // May actually be the result of another operation
$resultSet = new \Zend\Db\ResultSet\ResultSet;
$resultSet->initialize($input);

count(): Parameter must be an array or an object that implements Countable

in ResultSet/AbstractResultSet.php, line 80

Since initializing a ResultSet with an array is perfectly valid, an empty array should be accounted for.

@samsonasik
Copy link
Contributor

@hschletz I've created PR #303 for it

samsonasik added a commit to samsonasik/zend-db that referenced this issue Feb 1, 2018
@sfortop
Copy link

sfortop commented Feb 19, 2018

@samsonasik #295 issue not pull request
incorrect now https://github.com/zendframework/zend-db/pull/295

correct https://github.com/zendframework/zend-db/pull/303

@samsonasik
Copy link
Contributor

I can revert the changelog link if that is actually needed ;)

samsonasik added a commit to samsonasik/zend-db that referenced this issue Mar 27, 2018
samsonasik added a commit to samsonasik/zend-db that referenced this issue Mar 27, 2018
@froschdesign froschdesign added this to the 2.9.3 milestone Apr 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
4 participants