{"record":{"id":"6c6792684e9da6e8","repo":"octobercms/october","slug":"safe-mode-is-currently-enabled-that-prevents-php-c","errorCode":null,"errorMessage":"Safe mode is currently enabled that prevents PHP code changes.","messagePattern":"Safe mode is currently enabled that prevents PHP code changes\\.","errorType":"exception","errorClass":"ApplicationException","httpStatus":null,"severity":"error","filePath":"modules/cms/classes/CmsCompoundObject.php","lineNumber":160,"sourceCode":"     * of the $settings property after the object is loaded from a file.\n     * @return void\n     */\n    protected function parseSettings()\n    {\n        $this->fillViewBagArray();\n    }\n\n    /**\n     * checkSafeMode checks if safe mode is enabled by config, and the code\n     * attribute is modified and populated. If so an exception is thrown.\n     * @return void\n     */\n    protected function checkSafeMode()\n    {\n        $safeMode = System::checkSafeMode();\n\n        if ($safeMode && $this->isDirty('code') && strlen(trim($this->code))) {\n            throw new ApplicationException(Lang::get('cms::lang.cms_object.safe_mode_enabled'));\n        }\n    }\n\n    //\n    // Components\n    //\n\n    /**\n     * runComponents defined in the settings, this process halts\n     * if a component returns a value.\n     */\n    public function runComponents()\n    {\n        foreach ($this->components as $component) {\n            if ($result = $component->runLifeCycle()) {\n                return $result;\n            }\n        }","sourceCodeStart":142,"sourceCodeEnd":178,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/cms/classes/CmsCompoundObject.php#L142-L178","documentation":"Error \"Safe mode is currently enabled that prevents PHP code changes.\" thrown in octobercms/october.","triggerScenarios":"Thrown at modules/cms/classes/CmsCompoundObject.php:160 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":"b608633a7e8922487d91a8161499020121c3b3bf","analyzedAt":"2026-08-21T04:24:57.515Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}