Skip to content

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

Description

@4n70w4

src:

{"bankruptcy":null}

$src = {array} [1]
 bankruptcy = null

dst:

{"bankruptcy":24}

$dst = {array} [1]
 bankruptcy = {int} 24
{
    "message": "count(): Parameter must be an array or an object that implements Countable",
    "exception": "ErrorException",
    "file": "/var/www/app/vendor/mikemccabe/json-patch-php/src/JsonPatch.php",
    "line": 264,
    "trace": [
        {
            "file": "/var/www/app/vendor/sentry/sentry/src/ErrorHandler.php",
            "line": 361,
            "function": "handleError",
            "class": "Illuminate\\Foundation\\Bootstrap\\HandleExceptions",
            "type": "->"
        },
        {
            "function": "handleError",
            "class": "Sentry\\ErrorHandler",
            "type": "->"
        },
        {
            "file": "/var/www/app/vendor/mikemccabe/json-patch-php/src/JsonPatch.php",
            "line": 264,
            "function": "count"
        },
        {
            "file": "/var/www/app/vendor/mikemccabe/json-patch-php/src/JsonPatch.php",
            "line": 311,
            "function": "diff_values",
            "class": "mikemccabe\\JsonPatch\\JsonPatch",
            "type": "::"
        },
        {
            "file": "/var/www/app/vendor/mikemccabe/json-patch-php/src/JsonPatch.php",
            "line": 271,
            "function": "diff_assoc",
            "class": "mikemccabe\\JsonPatch\\JsonPatch",
            "type": "::"
        },
        {
            "file": "/var/www/app/vendor/mikemccabe/json-patch-php/src/JsonPatch.php",
            "line": 77,
            "function": "diff_values",
            "class": "mikemccabe\\JsonPatch\\JsonPatch",
            "type": "::"
        },

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions