Skip to content

Commit

Permalink
MDL-18567:
Browse files Browse the repository at this point in the history
Check for (boolean) false coming back from database instead of real data

Merged from STABLE_19
  • Loading branch information
thepurpleblob committed Mar 16, 2009
1 parent 410b53d commit 2681043
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mod/data/lib.php
Expand Up @@ -193,6 +193,11 @@ function display_add_field($recordid=0){
$content = '';
}

// beware get_field returns false for new, empty records MDL-18567
if ($content===false) {
$content='';
}

$str = '<div title="'.s($this->field->description).'">';
$str .= '<input style="width:300px;" type="text" name="field_'.$this->field->id.'" id="field_'.$this->field->id.'" value="'.s($content).'" />';
$str .= '</div>';
Expand Down

0 comments on commit 2681043

Please sign in to comment.