From 64434862b84b2f49625959f1e8842485e31a2ab1 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Wed, 4 Nov 2020 10:00:31 -0700 Subject: [PATCH] Update schema.php Prevent a plugin from breaking parts of the project. --- resources/classes/schema.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/resources/classes/schema.php b/resources/classes/schema.php index c898c807e7..8f907df2a6 100644 --- a/resources/classes/schema.php +++ b/resources/classes/schema.php @@ -50,7 +50,12 @@ if (!class_exists('schema')) { $config_list = glob($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . "/*/*/app_config.php"); $x=0; foreach ($config_list as &$config_path) { - include($config_path); + try { + include($config_path); + } + catch (Exception $e) { + //echo 'Caught exception: ', $e->getMessage(), "\n"; + } $x++; } $this->apps = $apps; @@ -521,7 +526,12 @@ if (!class_exists('schema')) { $config_list = glob($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . "/*/*/app_config.php"); $x=0; foreach ($config_list as &$config_path) { - include($config_path); + try { + include($config_path); + } + catch (Exception $e) { + //echo 'Caught exception: ', $e->getMessage(), "\n"; + } $x++; }