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

PHP7.2 fix: Added array check before count. #1454

Merged
merged 2 commits into from
Mar 18, 2020

Conversation

StianTorjussen
Copy link
Contributor

The call to get a post variable $http->postVariable( $postVariableName ) sometimes returned null.
Resulting in count(null), which triggers a warning.

Ref. phpdoc changelog for count:
https://www.php.net/manual/en/function.count.php#refsect1-function.count-changelog

Check for existence of post variable

Co-Authored-By: André R. <289757+andrerom@users.noreply.github.com>
@andrerom andrerom merged commit fe61c8a into ezsystems:2019.03 Mar 18, 2020
pkamps pushed a commit to mugoweb/ezpublish-legacy that referenced this pull request Apr 3, 2020
* Added array check before counting

* Apply suggestions from code review

Check for existence of post variable

Co-Authored-By: André R. <289757+andrerom@users.noreply.github.com>
pkamps added a commit to mugoweb/ezpublish-legacy that referenced this pull request Apr 3, 2020
* Added array check before counting

* Apply suggestions from code review

Check for existence of post variable

Co-Authored-By: André R. <289757+andrerom@users.noreply.github.com>

Co-authored-by: Stian Torjussen <53934716+StianTorjussen@users.noreply.github.com>
Co-authored-by: André R. <289757+andrerom@users.noreply.github.com>
glye pushed a commit that referenced this pull request May 22, 2020
* Added array check before counting

* Apply suggestions from code review

Check for existence of post variable

Co-Authored-By: André R. <289757+andrerom@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants