]> git.mxchange.org Git - hub.git/commitdiff
Converted an assertion into a more informative backtrace, if $unlInstance is not
authorRoland Haeder <roland@mxchange.org>
Sun, 1 Mar 2015 02:24:41 +0000 (03:24 +0100)
committerRoland Haeder <roland@mxchange.org>
Sun, 1 Mar 2015 02:24:41 +0000 (03:24 +0100)
implementing the expected interface 'LocateableNode'.

Signed-off-by: Roland Haeder <roland@mxchange.org>
application/hub/main/nodes/class_BaseHubNode.php

index 2228b3114ae06925ebd20d19a5302e337421ec8e..be5ed5f30d4eb4e9519b0427e3cab4220329973f 100644 (file)
@@ -743,8 +743,10 @@ class BaseHubNode extends BaseHubSystem implements Updateable, AddableCriteria {
                $unlInstance = $this->determineUniversalNodeLocator();
 
                // Make sure the instance is valid
-               // * DEBUG: */ $this->debugInstance('unlInstance[]=' . gettype($unlInstance));
-               assert($unlInstance instanceof LocateableNode);
+               if (!$unlInstance instanceof LocateableNode) {
+                       // No valid instance, so better debug this
+                       $this->debugBackTrace('unlInstance[' . gettype($unlInstance) . ']=' . $unlInstance);
+               } // END - if
 
                // ... and the array from it
                $unlData = $unlInstance->getUnlData();