Skip to content

PHP 7.2 issue - Parameter must be an array or an object that implements Countable #18

Description

@tyler-deboer

I'm getting a PHP error any time I try saving an entry with a Button Box field.

count(): Parameter must be an array or an object that implements Countable

The error says it's happening on Line 226 of vendor/craftcms/cms/src/fields/BaseOptionsField. Since the error is happening in the Craft vendor package, it may be something that has to be fixed in Craft itself? Or is that something that can be addressed in the plugin?

Interestingly enough, when I switched my MAMP environment from PHP 7.2 to PHP 7.1, the problem went away and I was able to save things correctly. So it seems to be a 7.2-specific issue.

PHP Version: 7.2.1
Craft Version: Craft Solo 3.0.3.1
Button Box Version: 2.0.0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions