X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FUtils%2FRequest.php;h=643646c2ed6265a5f6ef1fb88444cee947c6099c;hb=c839fadf5e37aecb9d022f4917fd3296da6e512c;hp=4b5d89fbcd06cb15b734dd64c3edb953d02fd173;hpb=8fcd163fd85f5b4b9d719386d5c9addca1f09f06;p=civicrm-core.git diff --git a/CRM/Utils/Request.php b/CRM/Utils/Request.php index 4b5d89fbcd..643646c2ed 100644 --- a/CRM/Utils/Request.php +++ b/CRM/Utils/Request.php @@ -88,10 +88,8 @@ class CRM_Utils_Request { break; } - if (isset($value) && - (CRM_Utils_Type::validate($value, $type, $abort, $name) === NULL) - ) { - $value = NULL; + if (isset($value)) { + $value = CRM_Utils_Type::validate($value, $type, $abort, $name); } if (!isset($value) && $store) { @@ -224,7 +222,7 @@ class CRM_Utils_Request { * The desired value. */ public static function retrieveComponent($attributes) { - $url = CRM_Utils_Array::value('action', $attributes); + $url = $attributes['action'] ?? NULL; // Whilst the following is a fallible universal test for urlencoded URLs, // thankfully the "action" URL has a limited and predictable form and // therefore this comparison is sufficient for our purposes.