]> git.mxchange.org Git - core.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Fri, 22 Aug 2025 00:52:48 +0000 (02:52 +0200)
committerRoland Häder <roland@mxchange.org>
Fri, 22 Aug 2025 00:52:48 +0000 (02:52 +0200)
- fixes error on returned type not matching

framework/main/classes/class_BaseFrameworkSystem.php

index 60c9519a794d944259d7bc8c1179a3e925abe433..257d1cdca5c9bb211ad716cae661d30c0df96960 100644 (file)
@@ -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)));