Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-35489 users: Check added before using form data

  • Loading branch information...
commit 62e1fab324a2414bcbabf5959534c591bea73091 1 parent f4b03cf
@rajeshtaneja rajeshtaneja authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 user/filters/text.php
View
7 user/filters/text.php
@@ -62,7 +62,12 @@ function check_data($formdata) {
// no data - no change except for empty filter
return false;
}
- return array('operator'=>(int)$formdata->$operator, 'value'=>$formdata->$field);
+ // If field value is set then use it, else it's null.
+ $fieldvalue = null;
+ if (isset($formdata->$field)) {
+ $fieldvalue = $formdata->$field;
+ }
+ return array('operator' => (int)$formdata->$operator, 'value' => $fieldvalue);
}
return false;
Please sign in to comment.
Something went wrong with that request. Please try again.