Skip to content

Commit

Permalink
CONTRIB-3797 : fixed typo
Browse files Browse the repository at this point in the history
Signed-off-by: Joseph Rézeau <moodle@rezeau.org>
  • Loading branch information
Joseph Rézeau committed Jul 24, 2012
1 parent dfad7cd commit c36cdc7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion questiontypes/questiontypes.class.php
Expand Up @@ -235,7 +235,7 @@ function insert_response_text($rid) {
$val = optional_param('q'.$this->id, '', PARAM_CLEAN);
// only insert if non-empty content
if($this->type_id == 10) { // numeric
$val = preg_replace("[/^0-9.\-]*(-?[0-9]*\.?[0-9]*).*/", '\1', $val);
$val = preg_replace("/[^0-9.\-]*(-?[0-9]*\.?[0-9]*).*/", '\1', $val);
}

if(preg_match("/[^ \t\n]/",$val)) {
Expand Down

0 comments on commit c36cdc7

Please sign in to comment.