Merge pull request #1923 from civicrm/4.3
[civicrm-core.git] / CRM / Extension / Container / Collection.php
index 6b69b794df5e72207246c859efbfe3463ca6c871..d95db44ab496986d01f8efdd4eb0f0073da35ff6 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.3                                                |
+ | CiviCRM version 4.4                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2013                                |
  +--------------------------------------------------------------------+
@@ -86,7 +86,8 @@ class CRM_Extension_Container_Collection implements CRM_Extension_Container_Inte
     }
     return $errors;
   }
-    /**
+
+  /**
    * {@inheritdoc}
    */
   public function getKeys() {
@@ -128,7 +129,7 @@ class CRM_Extension_Container_Collection implements CRM_Extension_Container_Inte
    */
   public function getContainer($key) {
     $k2c = $this->getKeysToContainer();
-    if (isset($k2c[$key])) {
+    if (isset($k2c[$key]) && isset($this->containers[$k2c[$key]])) {
       return $this->containers[$k2c[$key]];
     } else {
       throw new CRM_Extension_Exception_MissingException("Unknown extension: $key");