From: Roland Häder Date: Fri, 22 Aug 2025 00:52:48 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=454c17a2c157049c02a131fd4d0af2314c57da54;p=core.git Continued: - fixes error on returned type not matching --- diff --git a/framework/main/classes/class_BaseFrameworkSystem.php b/framework/main/classes/class_BaseFrameworkSystem.php index 60c9519a..257d1cdc 100644 --- a/framework/main/classes/class_BaseFrameworkSystem.php +++ b/framework/main/classes/class_BaseFrameworkSystem.php @@ -1921,8 +1921,11 @@ Loaded includes: // Default is 'null' $stateName = 'null'; - // Get the state instance - $stateInstance = $this->getStateInstance(); + // Check if state instance is there + if ($this->isStateInstanceSet()) { + // Get the state instance + $stateInstance = $this->getStateInstance(); + } // Is it an instance of Stateable? //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('BASE-FRAMEWORK-SYSTEM: stateInstance[]=%s', gettype($stateInstance)));