Permalink
Browse files

Merge branch 'wip-mdl-35489-m22' of git://github.com/rajeshtaneja/moo…

…dle into MOODLE_22_STABLE
  • Loading branch information...
2 parents b277186 + 62e1fab commit 4c8582b8c0641eb5bcab46ec2e9eedc632584427 @danpoltawski danpoltawski committed Oct 30, 2012
Showing with 6 additions and 1 deletion.
  1. +6 −1 user/filters/text.php
View
@@ -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;

0 comments on commit 4c8582b

Please sign in to comment.