From: Roland Haeder Date: Sun, 1 Mar 2015 02:24:41 +0000 (+0100) Subject: Converted an assertion into a more informative backtrace, if $unlInstance is not X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=62173ea99823f4fcff6922b01a9703ef835cb1d1;p=hub.git Converted an assertion into a more informative backtrace, if $unlInstance is not implementing the expected interface 'LocateableNode'. Signed-off-by: Roland Haeder --- diff --git a/application/hub/main/nodes/class_BaseHubNode.php b/application/hub/main/nodes/class_BaseHubNode.php index 2228b3114..be5ed5f30 100644 --- a/application/hub/main/nodes/class_BaseHubNode.php +++ b/application/hub/main/nodes/class_BaseHubNode.php @@ -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();