* @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)) {