From c6ae94bdc150221272da3dd11a62f12409285a06 Mon Sep 17 00:00:00 2001 From: eileen Date: Mon, 8 Jun 2020 17:17:50 +1200 Subject: [PATCH] Remove last instance of CRM_Core_Error::fatal.... --- CRM/Utils/Request.php | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/CRM/Utils/Request.php b/CRM/Utils/Request.php index 643646c2ed62..49b84ad8cd10 100644 --- a/CRM/Utils/Request.php +++ b/CRM/Utils/Request.php @@ -63,15 +63,13 @@ public static function id() { * Default value of the variable if not present. * @param string $method * Where to look for the variable - 'GET', 'POST' or 'REQUEST'. - * @param bool $isThrowException - * Should a an exception be thrown rather than a fatal. * * @return mixed * The value of the variable * * @throws \CRM_Core_Exception */ - public static function retrieve($name, $type, &$store = NULL, $abort = FALSE, $default = NULL, $method = 'REQUEST', $isThrowException = TRUE) { + public static function retrieve($name, $type, &$store = NULL, $abort = FALSE, $default = NULL, $method = 'REQUEST') { $value = NULL; switch ($method) { @@ -97,10 +95,7 @@ public static function retrieve($name, $type, &$store = NULL, $abort = FALSE, $d } if (!isset($value) && $abort) { - if ($isThrowException) { - throw new CRM_Core_Exception(ts("Could not find valid value for %1", [1 => $name])); - } - CRM_Core_Error::fatal(ts("Could not find valid value for %1", [1 => $name])); + throw new CRM_Core_Exception(ts('Could not find valid value for %1', [1 => $name])); } if (!isset($value) && $default) { @@ -108,7 +103,7 @@ public static function retrieve($name, $type, &$store = NULL, $abort = FALSE, $d } // minor hack for action - if ($name == 'action') { + if ($name === 'action') { if (!is_numeric($value) && is_string($value)) { $value = CRM_Core_Action::resolve($value); }