Skip to content

Commit

Permalink
Merge pull request #16525 from eileenmcnaughton/validate
Browse files Browse the repository at this point in the history
Allow any casting done in Type::validate to bubble up to Request::retrieveValue
  • Loading branch information
mattwire authored Feb 15, 2020
2 parents e8fa904 + 8ae17a2 commit b9d5ed4
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions CRM/Utils/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,8 @@ public static function retrieve($name, $type, &$store = NULL, $abort = FALSE, $d
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) {
Expand Down

0 comments on commit b9d5ed4

Please sign in to comment.