Skip to content

PHP warning, xmlrpc.inc line 2662: "Parameter must be an array or an object that implements Countable" #4

@firasd

Description

@firasd

When upgrading our environment to PHP 7.2, we got this message filling up our error log:

PHP Warning: count(): Parameter must be an array or an object that implements Countable in /wp-content/plugins/infusionsoft-sdk/Infusionsoft/xmlrpc.inc on line 2662

From looking at other projects that implement a similar xmlrpc library, it seems the change required is to modify line 2662, from:

if(!xml_parse($parser, $data, count($data)))
to:

if(!xml_parse($parser, $data, 1))

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