From: jitendrapurohit Date: Thu, 14 Apr 2016 12:14:59 +0000 (+0530) Subject: minor fix X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=131cc2ebe8a274f3b3850efea75c94737d939339;p=civicrm-core.git minor fix minor fix fix syntax error minor fix --- 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; } /**