Skip to content

Seeing PHP errors with PHP 7.2 #408

Closed
@gmclelland

Description

@gmclelland

Short description of the issue

If I navigate to the modules page, I see the following errors:

1x | PHP Warning: count(): Parameter must be an array or an object that implements Countable in .../Inputfield/InputfieldFile/InputfieldFile.module:637
--
1× | PHP Warning: count(): Parameter must be an array or an object that implements Countable in .../Inputfield/InputfieldFile/InputfieldFile.module:229

Expected behavior

No errors will be shown.

Actual behavior

Errors are shown.

Optional: Suggestion for a possible fix

@adrianbj suggested "Looks like we need to explicitly do an is_array() check before count() now."

Steps to reproduce the issue

  1. Go to the modules page
  2. View error with TracyDebugger shown in the backend

Setup/Environment

Apache/2.4.28 (Unix) PHP/7.2.0beta3

  • ProcessWire version:
    3.0.79

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions