X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fclasses%2Fmain%2Fclass_BaseFrameworkSystem.php;h=b3ad65ff8cc163cea7d0c01f00b6e36a4d1ec059;hb=8388b0ef4894097cbd2f44d0efb29e1d8e64a728;hp=585e93771f29ec9d3c4ae7ce2054cd180f0a42eb;hpb=607a11e2c22949ea0647568c17d62a605595e83b;p=core.git diff --git a/inc/classes/main/class_BaseFrameworkSystem.php b/inc/classes/main/class_BaseFrameworkSystem.php index 585e9377..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)) { @@ -1628,11 +1636,17 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { $fieldArray = $resultInstance->current(); //* DEBUG: */ $this->debugOutput($fieldName.':
'.print_r($fieldArray, true).'
'); + // Convert dashes to underscore + $fieldName = $this->convertDashesToUnderscores($fieldName); + // Does the field exist? if (isset($fieldArray[$fieldName])) { // Get it $fieldValue = $fieldArray[$fieldName]; - } // END - if + } else { + // Missing field entry, may require debugging + $this->debugOutput($this->__toString() . ':fieldname=' . $fieldName . ' not found!'); + } // Return it return $fieldValue;