{"record":{"id":"7bc86b2c012dde1b","repo":"getgrav/grav","slug":"calling-s-property-on-a-s-object-is-not-allo","errorCode":null,"errorMessage":"Calling \"%s\" property on a \"%s\" object is not allowed.","messagePattern":"Calling \"(.+?)\" property on a \"(.+?)\" object is not allowed\\.","errorType":"exception","errorClass":"SecurityNotAllowedPropertyError","httpStatus":null,"severity":"error","filePath":"system/src/Grav/Common/Twig/Sandbox/GravSecurityPolicy.php","lineNumber":130,"sourceCode":"            if ($obj instanceof $class) {\n                return true;\n            }\n        }\n\n        return false;\n    }\n\n    public function checkPropertyAllowed($obj, $property): void\n    {\n        foreach ($this->allowedProperties as $class => $properties) {\n            $props = is_array($properties) ? $properties : [$properties];\n            if ($obj instanceof $class && (in_array('*', $props, true) || in_array($property, $props, true))) {\n                return;\n            }\n        }\n\n        $class = $obj::class;\n        throw new SecurityNotAllowedPropertyError(\n            sprintf('Calling \"%s\" property on a \"%s\" object is not allowed.', $property, $class),\n            $class,\n            $property\n        );\n    }\n}\n","sourceCodeStart":112,"sourceCodeEnd":137,"githubUrl":"https://github.com/getgrav/grav/blob/6040efed04efa69b8209448ed81308e7c24147c2/system/src/Grav/Common/Twig/Sandbox/GravSecurityPolicy.php#L112-L137","documentation":"Error \"Calling \"%s\" property on a \"%s\" object is not allowed.\" thrown in getgrav/grav.","triggerScenarios":"Thrown at system/src/Grav/Common/Twig/Sandbox/GravSecurityPolicy.php:130 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6040efed04efa69b8209448ed81308e7c24147c2","analyzedAt":"2026-08-17T05:07:31.593Z","schemaVersion":2},"datasetVersion":"2026-08-17T09:17:11.063Z"}