-
Notifications
You must be signed in to change notification settings - Fork 121
Fix #295: handle empty array as datasource at AbstractResultSet::initialize() at php 7.2 #303
Conversation
CHANGELOG.md
Outdated
@@ -22,7 +22,7 @@ All notable changes to this project will be documented in this file, in reverse | |||
|
|||
### Fixed | |||
|
|||
- Nothing. | |||
- [#303](https://github.com/zendframework/zend-db/pull/303) fix error when datasource passed to `AbstractResultSet::initialize()` is empty array at php 7.2 environment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done ;), I've updated the reference link to use #295
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Solves the problem with my code and unit tests with php 7.2.
is there any chance to get it merged? Thank you. |
Just wondering if this will be merged into a release any time soon. I have an Apigility API that is using zend-db. This is blocking me from upgrading it to php 7.2. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
…sultSet::initialize() at php 7.2
rebased. |
It's good to use zend-db now with PHP 7.2! I noticed this as the persistence layer in my application stopped working in some cases. So iIf anyone else runs into similar problems, maybe this entry helps! |
@rzjack I created test at #313 and the |
Provide a narrative description of what you are trying to accomplish:
is
count()
on datasource whenever datasource is empty arraywhen datasource is empty array, it got error: "count(): Parameter must be an array or an object that implements Countable"
check the
current()
method, when it returnfalse
, set the count itself as 0.master
branch, and submit against that branch.CHANGELOG.md
entry for the fix.Fix #295