From 0e286b4f5a72309b0d7b957919733cc71303bc11 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Fri, 18 May 2012 20:23:58 +0000 Subject: [PATCH] Added handling of NPE (which is fine here) --- inc/classes/main/class_BaseFrameworkSystem.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/inc/classes/main/class_BaseFrameworkSystem.php b/inc/classes/main/class_BaseFrameworkSystem.php index 7ad8f74d..b3ad65ff 100644 --- a/inc/classes/main/class_BaseFrameworkSystem.php +++ b/inc/classes/main/class_BaseFrameworkSystem.php @@ -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)) { -- 2.30.2