Skip to content

Fixed the php 7.2 count warning on the Settings page#503

Closed
raduconst wants to merge 1 commit into
Automattic:masterfrom
raduconst:php72-warning
Closed

Fixed the php 7.2 count warning on the Settings page#503
raduconst wants to merge 1 commit into
Automattic:masterfrom
raduconst:php72-warning

Conversation

@raduconst
Copy link
Copy Markdown
Contributor

$edit_flow->modules is an object with all the active modules but count cannot be used on it because it's not a countable object.
The Settings page where this warning appears is a module too so this check is redundant since the result here will always be at least 1.
However, in order to make the warning go away, I choose to use get_object_vars because it's turning $edit_flow->modules object into an array of objects (that can be counted).

@mjangda
Copy link
Copy Markdown
Member

mjangda commented Oct 31, 2019

Replaced by #534

@mjangda mjangda closed this Oct 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants