diff options
author | alecpl <alec@alec.pl> | 2011-06-02 12:26:59 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2011-06-02 12:26:59 +0000 |
commit | 2d5beeaf06e92dd98adcb7c2661be93087542b46 (patch) | |
tree | 6c265517168c84c478f03bc3c78185a5d85b5b0e /program/steps | |
parent | d654e80084011ea85958de67a942c9552032bbee (diff) |
- Don't call rcube_idn_to_ascii() on empty data
Diffstat (limited to 'program/steps')
-rw-r--r-- | program/steps/settings/save_identity.inc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/program/steps/settings/save_identity.inc b/program/steps/settings/save_identity.inc index b2957a78b..f493f7385 100644 --- a/program/steps/settings/save_identity.inc +++ b/program/steps/settings/save_identity.inc @@ -116,9 +116,12 @@ else if (IDENTITIES_LEVEL < 2) $plugin = $RCMAIL->plugins->exec_hook('identity_create', array('record' => $save_data)); $save_data = $plugin['record']; - $save_data['email'] = rcube_idn_to_ascii($save_data['email']); - $save_data['bcc'] = rcube_idn_to_ascii($save_data['bcc']); - $save_data['reply-to'] = rcube_idn_to_ascii($save_data['reply-to']); + if ($save_data['email']) + $save_data['email'] = rcube_idn_to_ascii($save_data['email']); + if ($save_data['bcc']) + $save_data['bcc'] = rcube_idn_to_ascii($save_data['bcc']); + if ($save_data['reply-to']) + $save_data['reply-to'] = rcube_idn_to_ascii($save_data['reply-to']); if (!$plugin['abort']) $insert_id = $save_data['email'] ? $USER->insert_identity($save_data) : null; @@ -127,7 +130,7 @@ else if (IDENTITIES_LEVEL < 2) if ($insert_id) { $OUTPUT->show_message('successfullysaved', 'confirmation', null, false); - + $_GET['_iid'] = $insert_id; if (!empty($_POST['_standard'])) |