From: Roland Häder Date: Sun, 10 Feb 2013 04:15:02 +0000 (+0000) Subject: 'this' is not available in static methods, so get an own instance first X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=700d84f9c29cf052ed036fd7719ce3c82d54118c;p=hub.git 'this' is not available in static methods, so get an own instance first --- diff --git a/application/hub/main/tools/class_HubTools.php b/application/hub/main/tools/class_HubTools.php index 07cd8f7a5..1d203c8ef 100644 --- a/application/hub/main/tools/class_HubTools.php +++ b/application/hub/main/tools/class_HubTools.php @@ -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=
'.print_r($recipient, true).'
' . PHP_EOL); // Return result