]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/discovery/package/class_PackageRecipientDiscovery.php
Added required assert() to make sure that the requested data in the array is availabl...
[hub.git] / application / hub / main / discovery / package / class_PackageRecipientDiscovery.php
index 5567d36ed280b68c6afa7794e2f4c7aa38f5bc76..040c3083b65cf7e66da50295438ff3cfd85df532 100644 (file)
@@ -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();