summaryrefslogtreecommitdiff
path: root/program/steps/addressbook
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2012-01-04 14:00:13 +0000
committeralecpl <alec@alec.pl>2012-01-04 14:00:13 +0000
commita01df71de495de79624d79b78d2959a443334cce (patch)
tree5f2e4409c58881c1fbdc8c40458868e442eddf06 /program/steps/addressbook
parente2c9ab4df80ec9077408e59531a6f8d1baae53e4 (diff)
- Fix displaying form warnings on contact save
Diffstat (limited to 'program/steps/addressbook')
-rw-r--r--program/steps/addressbook/save.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/program/steps/addressbook/save.inc b/program/steps/addressbook/save.inc
index 03f6671e6..e93ce9918 100644
--- a/program/steps/addressbook/save.inc
+++ b/program/steps/addressbook/save.inc
@@ -81,8 +81,8 @@ if (empty($a_record['name'])) {
// do input checks (delegated to $CONTACTS instance)
if (!$CONTACTS->validate($a_record)) {
- $err = (array)$CONTACTS->get_error() + array('message' => 'formincomplete', 'type' => 'warning');
- $OUTPUT->show_message($err['message'], $err['type']);
+ $err = (array)$CONTACTS->get_error();
+ $OUTPUT->show_message($err['message'] ? $err['message'] : 'formincomplete', 'warning');
$GLOBALS['EDIT_RECORD'] = $a_record; // store submitted data to be used in edit form
rcmail_overwrite_action($return_action);
return;