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

fix warning 'Parameter must be an array or an object that implements … #50

Merged
merged 1 commit into from
Dec 4, 2017

Conversation

remicollet
Copy link
Contributor

@remicollet
Copy link
Contributor Author

remicollet commented Oct 24, 2017

I use the if ($result && ...) as this bolean test already used in setSubscription

Test suite only raise this warning in hasSubscription method, other check only added for consistency, so for sanity

@michalbundyra
Copy link
Member

@remicollet All changes I can see are:

 -        if (count($result)) {
 +        if ($result && count($result)) {

Wouldn't be enough to have just:

if ($result) {

?

@remicollet
Copy link
Contributor Author

@webimpress no idea, I don't now enough the whole stack involved here, so I just copy/paste a previously used test.

@michalbundyra
Copy link
Member

@remicollet it seems we need both, because it is an object, not a 'normal' array... :)

@weierophinney weierophinney merged commit e50e94d into zendframework:master Dec 4, 2017
weierophinney added a commit that referenced this pull request Dec 4, 2017
fix warning 'Parameter must be an array or an object that implements …
weierophinney added a commit that referenced this pull request Dec 4, 2017
weierophinney added a commit that referenced this pull request Dec 4, 2017
weierophinney added a commit that referenced this pull request Dec 4, 2017
@weierophinney
Copy link
Member

Thanks, @remicollet

weierophinney added a commit that referenced this pull request Dec 4, 2017
PHP 7.2 + QA Tools + Docs - follow up #50

Conflicts:
	composer.json
	composer.lock
weierophinney added a commit that referenced this pull request Dec 4, 2017
@froschdesign froschdesign added this to the 2.9.0 milestone Dec 5, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants