diff options
Diffstat (limited to 'system')
-rw-r--r-- | system/helpers/form_helper.php | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php index 8186d4ccd..a166198fb 100644 --- a/system/helpers/form_helper.php +++ b/system/helpers/form_helper.php @@ -196,9 +196,15 @@ function form_textarea($data = '', $value = '', $extra = '') {
$defaults = array('name' => (( ! is_array($data)) ? $data : ''), 'cols' => '90', 'rows' => '12');
- $val = (( ! is_array($data) OR ! isset($data['value'])) ? $value : $data['value']);
-
- unset ($data['value']); // textareas don't use the value attribute
+ if ( ! is_array($data) OR ! isset($data['value']))
+ {
+ $val = $value;
+ }
+ else
+ {
+ $val = $data['value'];
+ unset($data['value']); // textareas don't use the value attribute
+ }
return "<textarea ".parse_form_attributes($data, $defaults).$extra.">".$val."</textarea>\n";
}
|