Skip to content

Uncaught Error: preg_match(): Argument #2 ($subject) must be of type string, array given in /.../Framework/Policy/Typecast.php on line 37 #474

@aamplugin

Description

@aamplugin

AAM incorrectly handles non-scalar param values in JSON access policies that causes a fatal error in PHP 8. Example of Policy:

{
    "Statement": [
        {
            "Effect": "deny",
            "Resource": "PostType:post:posts",
            "Action": [
                "Edit"
            ],
            "Condition": {
                "In": {
                    "(*int)1": "(*array)${POLICY_PARAM.test}"
                }
            }
        }
    ],
    "Param": [
        {
            "Key": "test",
            "Value": "(*array)${CALLBACK.aam_test_get_markers}"
        }
    ]
}

Metadata

Metadata

Assignees

Labels

Projects

Status

Ready For Release

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions