From c879213e1d244b3e814473050719e87a7a343e82 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Tue, 7 Apr 2015 17:45:44 +0200 Subject: [PATCH] Throwing an NPE here hides the actual exception and it is much harder to track what is wrong. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- inc/classes/main/helper/class_BaseHelper.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/inc/classes/main/helper/class_BaseHelper.php b/inc/classes/main/helper/class_BaseHelper.php index daa707f9..8011081a 100644 --- a/inc/classes/main/helper/class_BaseHelper.php +++ b/inc/classes/main/helper/class_BaseHelper.php @@ -217,13 +217,8 @@ class BaseHelper extends BaseFrameworkSystem { // Is the value instance valid? if (is_null($this->valueInstance)) { - try { - // Get the requested instance - $this->valueInstance = ObjectFactory::createObjectByConfiguredName($registryKey . '_class', array($this->extraInstance)); - } catch (FrameworkException $e) { - // Okay, nothing found so throw a null pointer exception here - throw new NullPointerException($this, self::EXCEPTION_IS_NULL_POINTER); - } + // Get the requested instance + $this->valueInstance = ObjectFactory::createObjectByConfiguredName($registryKey . '_class', array($this->extraInstance)); } // END - if } -- 2.30.2