octobercms/october · error · ApplicationException
Safe mode is currently enabled that prevents PHP code change
Error message
Safe mode is currently enabled that prevents PHP code changes.
What it means
Error "Safe mode is currently enabled that prevents PHP code changes." thrown in octobercms/october.
Source
Thrown at modules/cms/controllers/Themes.php:356
return $this->makeWidget(\Backend\Widgets\Form::class, $widgetConfig);
}
//
// Theme import
//
/**
* index_onLoadImportForm
*/
public function index_onLoadImportForm()
{
if (!BackendAuth::userHasAccess('cms.themes.create')) {
throw new ForbiddenException;
}
if (System::checkSafeMode()) {
throw new ApplicationException(Lang::get('cms::lang.cms_object.safe_mode_enabled'));
}
$theme = $this->findThemeObject();
$this->vars['widget'] = $this->makeImportFormWidget($theme);
$this->vars['themeDir'] = $theme->getDirName();
return $this->makePartial('theme_import_form');
}
/**
* index_onImport
*/
public function index_onImport()
{
if (!BackendAuth::userHasAccess('cms.themes.create')) {
throw new ForbiddenException;
}
View on GitHub (pinned to b608633a7e)
When it happens
Trigger: Thrown at modules/cms/controllers/Themes.php:356 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of octobercms/october@b608633a7e (2026-08-21).
Data as JSON: /api/errors/c0452d943ab76e0f.
Report an issue: GitHub.