]> git.mxchange.org Git - hub.git/commitdiff
'this' is not available in static methods, so get an own instance first
authorRoland Häder <roland@mxchange.org>
Sun, 10 Feb 2013 04:15:02 +0000 (04:15 +0000)
committerRoland Häder <roland@mxchange.org>
Sun, 10 Feb 2013 04:15:02 +0000 (04:15 +0000)
application/hub/main/tools/class_HubTools.php

index 07cd8f7a5f6d3cef48bcc852053be790cbe89eeb..1d203c8eff26b47ea39391e1aa26dfe76720b130 100644 (file)
@@ -128,8 +128,11 @@ class HubTools extends BaseHubSystem {
         * @return      $sessionId      Valid session id
         */
        public static function resolveSessionIdByIpPort ($ipPort) {
+               // Get an own instance
+               $selfInstance = self::getSelfInstance();
+
                // And ask it for session id by given ip:port
-               $recipient = $this->getDhtInstance()->findNodeByIpPort($ipPort);
+               $recipient = $selfInstance->getDhtInstance()->findNodeByIpPort($ipPort);
                die(__METHOD__.':recipient=<pre>'.print_r($recipient, true).'</pre>' . PHP_EOL);
 
                // Return result