From: Roland Häder Date: Fri, 28 Jun 2013 21:43:47 +0000 (+0000) Subject: Assert on important array elements X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=d448806874a7bef853deec84def7d4961ca63253;p=hub.git Assert on important array elements --- diff --git a/application/hub/main/tags/package/class_PackageTags.php b/application/hub/main/tags/package/class_PackageTags.php index b46eb3437..543e4dfcc 100644 --- a/application/hub/main/tags/package/class_PackageTags.php +++ b/application/hub/main/tags/package/class_PackageTags.php @@ -129,7 +129,7 @@ class PackageTags extends BaseTags implements Tagable { $entry = $objectRegistryInstance->getArrayFromKey(XmlObjectRegistryTemplateEngine::OBJECT_TYPE_DATA_NAME, $tag); // If the array is empty, the entry is invalid! - if (count($entry) == 0) { + if ((count($entry) == 0) || (!isset($entry[XmlObjectRegistryTemplateEngine::OBJECT_TYPE_DATA_PROTOCOL])) || (!isset($entry[XmlObjectRegistryTemplateEngine::OBJECT_TYPE_DATA_RECIPIENT_TYPE]))) { // Invalid entry found throw new InvalidTagException(array($this, $tag), self::EXCEPTION_INVALID_TAG); } // END - if