From f3aa87122efa054eb12b7b2f25dd95b81132c7c5 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sun, 4 Jul 2004 06:19:41 +0000 Subject: - Textarea's did not have error handling support yet. --- includes/common.inc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'includes') diff --git a/includes/common.inc b/includes/common.inc index 48d2a3e01..bd6b2b15e 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -964,7 +964,9 @@ function form_set_error($name, $message) { * Return true when errors have been set. */ function form_has_errors() { - return array_key_exists('form', $GLOBALS); + if (array_key_exists('form', $GLOBALS)) { + return $GLOBALS['form']; + } } /** @@ -1040,7 +1042,7 @@ function form_password($title, $name, $value, $size, $maxlength, $description = function form_textarea($title, $name, $value, $cols, $rows, $description = NULL, $attributes = NULL, $required = FALSE) { $cols = $cols ? " cols=\"$cols\"" : ""; module_invoke_all("textarea", $name); // eg. optionally plug in a WYSIWYG editor - return theme("form_element", $title, "", $description, $name, $required, _form_get_error($name)); + return theme("form_element", $title, "", $description, $name, $required, _form_get_error($name)); } /** -- cgit v1.2.3