]> git.mxchange.org Git - core.git/commitdiff
Added handling of NPE (which is fine here)
authorRoland Häder <roland@mxchange.org>
Fri, 18 May 2012 20:23:58 +0000 (20:23 +0000)
committerRoland Häder <roland@mxchange.org>
Fri, 18 May 2012 20:23:58 +0000 (20:23 +0000)
inc/classes/main/class_BaseFrameworkSystem.php

index 7ad8f74dbe0db41399145246c402434df0f7dffb..b3ad65ff8cc163cea7d0c01f00b6e36a4d1ec059 100644 (file)
@@ -1398,8 +1398,16 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
         * @return      void
         */
        public function debugOutput ($message, $doPrint = true) {
-               // Get debug instance
-               $debugInstance = $this->getDebugInstance();
+               // Set debug instance to NULL
+               $debugInstance = NULL;
+
+               // Try it:
+               try {
+                       // Get debug instance
+                       $debugInstance = $this->getDebugInstance();
+               } catch (NullPointerException $e) {
+                       // The debug instance is not set (yet)
+               }
 
                // Is the debug instance there?
                if (is_object($debugInstance)) {