From 193e418fd76d06a69d5031b9702fa0c093c95cad Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Thu, 21 Feb 2013 22:57:14 +0000 Subject: [PATCH] Added required assert() to make sure that the requested data in the array is available (do always use my constants if you create such arrays on your own) --- .../discovery/package/class_PackageRecipientDiscovery.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/application/hub/main/discovery/package/class_PackageRecipientDiscovery.php b/application/hub/main/discovery/package/class_PackageRecipientDiscovery.php index 5567d36ed..040c3083b 100644 --- a/application/hub/main/discovery/package/class_PackageRecipientDiscovery.php +++ b/application/hub/main/discovery/package/class_PackageRecipientDiscovery.php @@ -59,6 +59,9 @@ class PackageRecipientDiscovery extends BaseHubDiscovery implements Discoverable * @return void */ public function discoverRecipients (array $packageData) { + // This must be available + assert($packageData[NetworkPackage::PACKAGE_DATA_RECIPIENT]); + // First try out the direct recipient (session id) try { // Get instance (should not break) @@ -90,6 +93,9 @@ class PackageRecipientDiscovery extends BaseHubDiscovery implements Discoverable * @todo The if() does only check for TCP, not UDP, e.g. try to get a $handlerInstance here */ public function discoverRawRecipients (array $decodedData) { + // This must be available + assert($decodedData[NetworkPackage::PACKAGE_DATA_RECIPIENT]); + // First clear all recipients $this->clearRecipients(); -- 2.39.2