{"record":{"id":"5527c1123ee2b99d","repo":"octobercms/october","slug":"calling-s-property-on-a-s-object-is-blocked","errorCode":null,"errorMessage":"Calling \"%s\" property on a \"%s\" object is blocked.","messagePattern":"Calling \"(.+?)\" property on a \"(.+?)\" object is blocked\\.","errorType":"exception","errorClass":"Twig\\Sandbox\\SecurityNotAllowedPropertyError","httpStatus":null,"severity":"error","filePath":"modules/system/twig/SecurityPolicyLegacy.php","lineNumber":140,"sourceCode":"            }\n        }\n\n        // Check general methods\n        if (in_array($blockedMethod, $this->blockedMethods)) {\n            $class = get_class($obj);\n            throw new SecurityNotAllowedMethodError(sprintf('Calling \"%s\" method on a \"%s\" object is blocked.', $method, $class), $class, $method);\n        }\n    }\n\n    /**\n     * checkPropertyAllowed\n     * @throws SecurityNotAllowedPropertyError\n     */\n    public function checkPropertyAllowed($obj, $property): void\n    {\n        if (in_array($property, $this->blockedProperties)) {\n            $class = get_class($obj);\n            throw new SecurityNotAllowedPropertyError(sprintf('Calling \"%s\" property on a \"%s\" object is blocked.', $property, $class), $class, $property);\n        }\n    }\n}\n","sourceCodeStart":122,"sourceCodeEnd":144,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/system/twig/SecurityPolicyLegacy.php#L122-L144","documentation":"Legacy Twig security policy checkPropertyAllowed: the template accessed a property listed in blockedProperties on the given object. Property access is denied to prevent leaking internals through Twig; remove the access or adjust the policy.","triggerScenarios":"Thrown at modules/system/twig/SecurityPolicyLegacy.php:140 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Access the value through an allowed method or precomputed variable","Remove the property from the blocked list if access is intended"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b608633a7e8922487d91a8161499020121c3b3bf","analyzedAt":"2026-08-21T04:24:57.515Z","contentChangedAt":"2026-08-21T04:24:57.515Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}