Merge pull request #2762 from amitajgaonkar/WebtestIssues
[civicrm-core.git] / CRM / Extension / Container / Collection.php
index 6b69b794df5e72207246c859efbfe3463ca6c871..4a2a12b430431830b77a8a5ae4452f7573b9f38c 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.3                                                |
+ | CiviCRM version 4.5                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013                                |
+ | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -27,7 +27,7 @@
 
 /**
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2013
+ * @copyright CiviCRM LLC (c) 2004-2014
  * $Id$
  */
 
@@ -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");