From 70844be0efd9fe570405a92617b3b7ae2b900d6f Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Sat, 15 Feb 2014 23:07:30 +0100 Subject: [PATCH] Added exit; after all trigger_error() calls. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- inc/classes/main/class_BaseFrameworkSystem.php | 16 ++++++++++++++++ inc/selector.php | 4 +++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/inc/classes/main/class_BaseFrameworkSystem.php b/inc/classes/main/class_BaseFrameworkSystem.php index 8147d534..78ee47fd 100644 --- a/inc/classes/main/class_BaseFrameworkSystem.php +++ b/inc/classes/main/class_BaseFrameworkSystem.php @@ -355,6 +355,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { } else { // Do not call this twice trigger_error(__METHOD__ . ': Called twice.'); + exit; } } @@ -1410,6 +1411,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { } else { // Trigger an error trigger_error($stubMessage); + exit; } } @@ -1775,6 +1777,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { } else { // Trigger an error trigger_error($message . "
\n"); + exit; } } else { // @TODO Finish this part! @@ -2198,6 +2201,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { if (!$this->isGenericArrayGroupSet($keyGroup, $subGroup)) { // No, then abort here trigger_error(__METHOD__ . ': keyGroup=' . $keyGroup . ',subGroup=' . $subGroup . ' not found.'); + exit; } // END - if // Debug message @@ -2304,6 +2308,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { if (($forceInit === FALSE) && ($this->isGenericArrayGroupSet($keyGroup, $subGroup))) { // Already initialized trigger_error(__METHOD__ . ':keyGroup=' . $keyGroup . ',subGroup=' . $subGroup . ' already initialized.'); + exit; } // END - if // Initialize it @@ -2327,6 +2332,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { if (($forceInit === FALSE) && ($this->isGenericArrayKeySet($keyGroup, $subGroup, $key))) { // Already initialized trigger_error(__METHOD__ . ':keyGroup=' . $keyGroup . ',subGroup=' . $subGroup . ',key=' . $key . ' already initialized.'); + exit; } // END - if // Initialize it @@ -2351,6 +2357,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { if (($forceInit === FALSE) && ($this->isGenericArrayElementSet($keyGroup, $subGroup, $key, $element))) { // Already initialized trigger_error(__METHOD__ . ':keyGroup=' . $keyGroup . ',subGroup=' . $subGroup . ',key=' . $key . ',element=' . $element . ' already initialized.'); + exit; } // END - if // Initialize it @@ -2430,6 +2437,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { if (!$this->isGenericArrayKeySet($keyGroup, $subGroup, $key)) { // Not found trigger_error(__METHOD__ . ': keyGroup=' . $keyGroup . ',subGroup=' . $subGroup . ',key=' . $key . ' not found.'); + exit; } // END - if // Then "pop" it @@ -2457,6 +2465,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { if (!$this->isGenericArrayKeySet($keyGroup, $subGroup, $key)) { // Not found trigger_error(__METHOD__ . ': keyGroup=' . $keyGroup . ',subGroup=' . $subGroup . ',key=' . $key . ' not found.'); + exit; } // END - if // Then "shift" it @@ -2482,6 +2491,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { if (!isset($this->genericArray[$keyGroup])) { // Abort here trigger_error(__METHOD__ . ': keyGroup=' . $keyGroup . ' not found.'); + exit; } // END - if // Then count it @@ -2509,6 +2519,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { if (!$this->isGenericArrayGroupSet($keyGroup, $subGroup)) { // Abort here trigger_error(__METHOD__ . ': keyGroup=' . $keyGroup . ',subGroup=' . $subGroup . ' not found.'); + exit; } // END - if // Then count it @@ -2537,9 +2548,11 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { if (!$this->isGenericArrayKeySet($keyGroup, $subGroup, $key)) { // Abort here trigger_error(__METHOD__ . ': keyGroup=' . $keyGroup . ',subGroup=' . $subGroup . ' not found.'); + exit; } elseif (!$this->isValidGenericArrayGroup($keyGroup, $subGroup)) { // Not valid trigger_error(__METHOD__ . ': keyGroup=' . $keyGroup . ',subGroup=' . $subGroup . ' is not an array.'); + exit; } // Then count it @@ -2566,6 +2579,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { if (!isset($this->genericArray[$keyGroup])) { // Then abort here trigger_error(__METHOD__ . ': keyGroup=' . $keyGroup . ' does not exist.'); + exit; } // END - if // Return it @@ -2605,6 +2619,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { if (!$this->isGenericArrayKeySet($keyGroup, $subGroup, $key)) { // Then abort here trigger_error(__METHOD__ . ': keyGroup=' . $keyGroup . ',subGroup=' . $subGroup . ',key=' . $key . ' does not exist.'); + exit; } // END - if // Return it @@ -2646,6 +2661,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { if (!$this->isGenericArrayElementSet($keyGroup, $subGroup, $key, $element)) { // Then abort here trigger_error(__METHOD__ . ': keyGroup=' . $keyGroup . ',subGroup=' . $subGroup . ',key=' . $key . ',element=' . $element . ' does not exist.'); + exit; } // END - if // Return it diff --git a/inc/selector.php b/inc/selector.php index 6f42112e..10529813 100644 --- a/inc/selector.php +++ b/inc/selector.php @@ -44,6 +44,7 @@ $basePathFile = FrameworkConfiguration::getSelfInstance()->getConfigEntry('appli if (!is_dir($basePathFile)) { // Not found. trigger_error('Application ' . FrameworkConfiguration::getSelfInstance()->getConfigEntry('app_name') . ' not found.'); + exit; } // END - if // Load them all (try only) @@ -65,9 +66,10 @@ foreach ($configAppIncludes as $appInc) { //* DEBUG: */ print basename(__FILE__)."[".__LINE__."]: Loading ".basename($appFqFn)." - END\n"; } elseif (FrameworkConfiguration::getSelfInstance()->getConfigEntry('verbose_level') > 0) { // File is missing - trigger_error(sprintf("Cannot load application script %s.php! File is missing or read-protected.", + trigger_error(sprintf('Cannot load application script %s.php! File is missing or read-protected.', $appInc )); + exit; } } -- 2.39.5