A free open source IT asset/license management system
Only check if table exists if there is not a value for the static cache yet
snipe4fc88f673d7e
diff --git a/app/Models/Setting.php b/app/Models/Setting.phpindex b67f87599c..2d112025f5 100755--- a/app/Models/Setting.php+++ b/app/Models/Setting.php@@ -48,13 +48,14 @@ class Setting extends Modelpublic static function getSettings(){static $static_cache = null;-- if (Schema::hasTable('settings')) {+if (!$static_cache) {- $static_cache = Setting::first();+ if (Schema::hasTable('settings')) {+ $static_cache = Setting::first();+ }}return $static_cache;- }+return false;