Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP 7.2 fixed parameter passed to count #190

Merged
merged 2 commits into from Dec 13, 2017

Conversation

@ondrakub
Copy link
Contributor

ondrakub commented Dec 12, 2017

  • bug fix? yes
  • new feature? no
  • BC break? no

The $ref variable could have null value and in PHP 7.2 parameter in count can only be an array or an object implements Countable

…implements Countable
@JanTvrdik

This comment has been minimized.

Copy link
Contributor

JanTvrdik commented Dec 12, 2017

Or can probably simply replace count($ref) with count($ref ?? [])

@ondrakub

This comment has been minimized.

Copy link
Contributor Author

ondrakub commented Dec 12, 2017

@JanTvrdik yes, that's even better. I've just pushed commit.

@dg

This comment has been minimized.

Copy link
Member

dg commented Dec 13, 2017

Thanks

@dg dg merged commit 544c164 into nette:master Dec 13, 2017
0 of 2 checks passed
0 of 2 checks passed
continuous-integration/appveyor/pr AppVeyor build failed
Details
continuous-integration/travis-ci/pr The Travis CI build failed
Details
dg added a commit that referenced this pull request Feb 5, 2018
* fixed Warning: count(): Parameter must be an array or an object that implements Countable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.