]> git.mxchange.org Git - hub.git/commitdiff
Assert on important array elements
authorRoland Häder <roland@mxchange.org>
Fri, 28 Jun 2013 21:43:47 +0000 (21:43 +0000)
committerRoland Häder <roland@mxchange.org>
Fri, 28 Jun 2013 21:43:47 +0000 (21:43 +0000)
application/hub/main/tags/package/class_PackageTags.php

index b46eb34377ee708ff656a99df14e6d51d42a3192..543e4dfcc59050814ecfa48dbe5a06458cf9522b 100644 (file)
@@ -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