From 131cc2ebe8a274f3b3850efea75c94737d939339 Mon Sep 17 00:00:00 2001 From: jitendrapurohit Date: Thu, 14 Apr 2016 17:44:59 +0530 Subject: [PATCH] minor fix minor fix fix syntax error minor fix --- CRM/Utils/Request.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/CRM/Utils/Request.php b/CRM/Utils/Request.php index a5357f85f3..f5fd4b14b7 100644 --- a/CRM/Utils/Request.php +++ b/CRM/Utils/Request.php @@ -146,14 +146,22 @@ class CRM_Utils_Request { * The value of the variable */ public static function getValue($name, $method) { + if (isset($method[$name])) { + return $method[$name]; + } // CRM-18384 - decode incorrect keys generated when & is present in url foreach ($method as $key => $value) { - if (strpos($key, 'amp;') !== false) { + if (strpos($key, 'amp;') !== FALSE) { $method[str_replace('amp;', '', $key)] = $method[$key]; - unset($method[$key]); + if (isset($method[$name])) { + return $method[$name]; + } + else { + continue; + } } } - return CRM_Utils_Array::value($name, $method); + return NULL; } /** -- 2.25.1