Skip to content

A free open source IT asset/license management system

Allow supression of debug warning for demo

snipe5bca1ed2b670
diff --git a/app/Http/Middleware/CheckForDebug.php b/app/Http/Middleware/CheckForDebug.php
index 43a89f25cb..2486f20120 100644
--- a/app/Http/Middleware/CheckForDebug.php
+++ b/app/Http/Middleware/CheckForDebug.php
@@ -18,7 +18,7 @@ class CheckForDebug
{
view()->share('debug_in_production', false);
- if (((Auth::check() && (Auth::user()->isSuperUser()))) && (app()->environment()=='production') && (config('app.debug')===true)) {
+ if (((Auth::check() && (Auth::user()->isSuperUser()))) && (app()->environment()=='production') && (config('app.warn_debug')===true) && (config('app.debug')===true)) {
view()->share('debug_in_production', true);
}
diff --git a/config/app.php b/config/app.php
index a54c267f6d..753a568228 100755
--- a/config/app.php
+++ b/config/app.php
@@ -27,6 +27,7 @@ return [
*/
'debug' => env('APP_DEBUG', false),
+ 'warn_debug' => env('WARN_DEBUG', true),
/*
|--------------------------------------------------------------------------