From 62173ea99823f4fcff6922b01a9703ef835cb1d1 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Sun, 1 Mar 2015 03:24:41 +0100 Subject: [PATCH] Converted an assertion into a more informative backtrace, if $unlInstance is not implementing the expected interface 'LocateableNode'. Signed-off-by: Roland Haeder --- application/hub/main/nodes/class_BaseHubNode.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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(); -- 2.39.5