From: Roland Häder Date: Tue, 7 Aug 2012 00:10:51 +0000 (+0000) Subject: Used exit() (also app_die()->app_exit()) because die() is an alias of exit nowadays X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=0088a32f8609875b6151dfa516f7c2d92fa3a5a8;p=core.git Used exit() (also app_die()->app_exit()) because die() is an alias of exit nowadays --- diff --git a/inc/classes/main/class_BaseFrameworkSystem.php b/inc/classes/main/class_BaseFrameworkSystem.php index 76c89082..da54f83a 100644 --- a/inc/classes/main/class_BaseFrameworkSystem.php +++ b/inc/classes/main/class_BaseFrameworkSystem.php @@ -1316,7 +1316,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { ); // Output it - ApplicationEntryPoint::app_die(sprintf("
%s debug output:
%s
\nLoaded includes:
%s
", + ApplicationEntryPoint::app_exit(sprintf("
%s debug output:
%s
\nLoaded includes:
%s
", $this->__toString(), $content, ClassLoader::getSelfInstance()->getPrintableIncludeList() @@ -1419,7 +1419,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { $debugInstance = DebugMiddleware::createDebugMiddleware(FrameworkConfiguration::getSelfInstance()->getConfigEntry('debug_class')); } catch (NullPointerException $e) { // Didn't work, no instance there - die('Cannot create debugInstance! Exception=' . $e->__toString() . ', message=' . $e->getMessage()); + exit('Cannot create debugInstance! Exception=' . $e->__toString() . ', message=' . $e->getMessage()); } // Empty string should be ignored and used for testing the middleware @@ -1431,8 +1431,8 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { /** * Outputs a debug message whether to debug instance (should be set!) or - * dies with or ptints the message. Do NEVER EVER rewrite the die() call to - * ApplicationEntryPoint::app_die(), this would cause an endless loop. + * dies with or ptints the message. Do NEVER EVER rewrite the exit() call to + * ApplicationEntryPoint::app_exit(), this would cause an endless loop. * * @param $message Message we shall send out... * @param $doPrint Whether print or die here (default: print) @@ -1458,7 +1458,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { if ($doPrint === false) { // Die here if not printed - die(); + exit(); } // END - if } else { // Are debug times enabled? @@ -1473,7 +1473,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { print($message . chr(10)); } else { // Die here - die($message); + exit($message); } } } diff --git a/inc/classes/main/menu/class_BaseMenu.php b/inc/classes/main/menu/class_BaseMenu.php index c41bdcb7..69672112 100644 --- a/inc/classes/main/menu/class_BaseMenu.php +++ b/inc/classes/main/menu/class_BaseMenu.php @@ -64,7 +64,7 @@ class BaseMenu extends BaseFrameworkSystem { // Render it here $this->getTemplateInstance()->renderXmlContent($menuContent); - //die(__METHOD__ . ':!OK'); + //exit(__METHOD__ . ':!OK'); } /** diff --git a/inc/classes/main/parser/xml/class_XmlParser.php b/inc/classes/main/parser/xml/class_XmlParser.php index 3394a85a..d8cf17a6 100644 --- a/inc/classes/main/parser/xml/class_XmlParser.php +++ b/inc/classes/main/parser/xml/class_XmlParser.php @@ -68,7 +68,7 @@ class XmlParser extends BaseParser implements Parseable { self::createDebugInstance(__CLASS__)->debugOutput('Empty content! Backtrace:
');
 			debug_print_backtrace();
 			self::createDebugInstance(__CLASS__)->debugOutput('
'); - die(); + exit(); } elseif (function_exists('recode')) { // Recode found, so use it $content = recode('html..utf8', $content); @@ -102,7 +102,7 @@ class XmlParser extends BaseParser implements Parseable { // Now parse the XML tree if (!xml_parse($xmlParser, $content)) { // Error found in XML! - //* DEBUG: */ die(__METHOD__ . ':
'.htmlentities($content).'
'); + //* DEBUG: */ exit(__METHOD__ . ':
'.htmlentities($content).'
'); throw new XmlParserException(array($this, $xmlParser), self::EXCEPTION_XML_PARSER_ERROR); } // END - if diff --git a/inc/classes/main/template/class_BaseTemplateEngine.php b/inc/classes/main/template/class_BaseTemplateEngine.php index 2692af52..b143aebe 100644 --- a/inc/classes/main/template/class_BaseTemplateEngine.php +++ b/inc/classes/main/template/class_BaseTemplateEngine.php @@ -1025,7 +1025,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem { $this->assignVariable($var, $varMatches[3][$key]); } elseif (!empty($varMatches[2][$key])) { // @TODO Non-string found so we need some deeper analysis... - ApplicationEntryPoint::app_die('Deeper analysis not yet implemented!'); + ApplicationEntryPoint::app_exit('Deeper analysis not yet implemented!'); } } // END - foreach } diff --git a/inc/classes/third_party/api/wernisportal/class_WernisApi.php b/inc/classes/third_party/api/wernisportal/class_WernisApi.php index 77f88e65..d2e10548 100644 --- a/inc/classes/third_party/api/wernisportal/class_WernisApi.php +++ b/inc/classes/third_party/api/wernisportal/class_WernisApi.php @@ -142,7 +142,7 @@ class WernisApi extends BaseFrameworkSystem { global $_CONFIG; include "templates/zurueck.html"; include "templates/fuss.html"; - die(); + exit(); } // Fehlermeldung ausgeben und beenden diff --git a/inc/database.php b/inc/database.php index 6f454a69..f56baa3a 100644 --- a/inc/database.php +++ b/inc/database.php @@ -36,7 +36,7 @@ if ((file_exists($fqfn)) && (is_file($fqfn)) && (is_readable($fqfn))) { require($fqfn); } else { // Layer is missing! - ApplicationEntryPoint::app_die(sprintf("[Main:] Database layer is missing! (%s) -> R.I.P.", + ApplicationEntryPoint::app_exit(sprintf("[Main:] Database layer is missing! (%s) -> R.I.P.", FrameworkConfiguration::getSelfInstance()->getConfigEntry('db_type') )); } diff --git a/inc/loader/class_ClassLoader.php b/inc/loader/class_ClassLoader.php index 4b46ffa8..2de06ca2 100644 --- a/inc/loader/class_ClassLoader.php +++ b/inc/loader/class_ClassLoader.php @@ -271,7 +271,7 @@ class ClassLoader { // If the basePath is false it is invalid if ($basePath2 === false) { /* @todo: Do not die here. */ - die(__METHOD__ . ':Cannot read ' . $basePath . ' !'); + exit(__METHOD__ . ':Cannot read ' . $basePath . ' !'); } else { // Set base path $basePath = $basePath2;