mirror of
https://github.com/wintercms/winter.git
synced 2024-06-28 05:33:29 +02:00
Add warning in status widget when debug mode is enabled (#4500)
Debug mode is now shown as a warning in the Status report widget to indicate that its use is discouraged for production websites. Credit to @Samuell1.
This commit is contained in:
parent
188c565d69
commit
60a235e000
@ -364,6 +364,7 @@ return [
|
||||
'permissions' => 'Directory :name or its subdirectories is not writable for PHP. Please set corresponding permissions for the webserver on this directory.',
|
||||
'extension' => 'The PHP extension :name is not installed. Please install this library and activate the extension.',
|
||||
'plugin_missing' => 'The plugin :name is a dependency but is not installed. Please install this plugin.',
|
||||
'debug' => 'Debug mode is enabled. This is not recommended for production installations.'
|
||||
],
|
||||
'editor' => [
|
||||
'menu_label' => 'Editor settings',
|
||||
|
@ -99,6 +99,10 @@ class Status extends ReportWidgetBase
|
||||
$writablePaths[] = themes_path();
|
||||
}
|
||||
|
||||
if (Config::get('app.debug', true)) {
|
||||
$warnings[] = Lang::get('backend::lang.warnings.debug');
|
||||
}
|
||||
|
||||
$requiredExtensions = [
|
||||
'GD' => extension_loaded('gd'),
|
||||
'fileinfo' => extension_loaded('fileinfo'),
|
||||
|
Loading…
x
Reference in New Issue
Block a user