diff options
author | Aleksander Machniak <alec@alec.pl> | 2013-09-20 08:34:55 +0200 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2013-09-20 08:34:55 +0200 |
commit | 962eff7dfe2456c32d08587d0c413155842578eb (patch) | |
tree | 5228ec061358aa33cc602edaa3358a520284addf /plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php | |
parent | b334a01791689a16c8d6b10955df850b891ff40e (diff) |
Fix bug where at least one additional address of vacation message was required (#1489345)
Diffstat (limited to 'plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php')
-rw-r--r-- | plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php b/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php index e4efef5b3..685a66aec 100644 --- a/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php +++ b/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php @@ -871,7 +871,12 @@ class rcube_sieve_engine // @TODO: vacation :mime, :from, :handle foreach ((array)$this->form['actions'][$i]['addresses'] as $aidx => $address) { - if (!rcube_utils::check_email($address)) { + $this->form['actions'][$i]['addresses'][$aidx] = $address = trim($address); + + if (empty($address)) { + unset($this->form['actions'][$i]['addresses'][$aidx]); + } + else if (!rcube_utils::check_email($address)) { $this->errors['actions'][$i]['addresses'] = $this->plugin->gettext('noemailwarning'); break; } |