summaryrefslogtreecommitdiff
path: root/plugins/managesieve
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/managesieve')
-rw-r--r--plugins/managesieve/managesieve.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/managesieve/managesieve.php b/plugins/managesieve/managesieve.php
index fc2925765..30bcf607b 100644
--- a/plugins/managesieve/managesieve.php
+++ b/plugins/managesieve/managesieve.php
@@ -325,11 +325,11 @@ class managesieve extends rcube_plugin
foreach ($headers as $hr)
if (!preg_match('/^[a-z0-9-]+$/i', $hr))
$this->errors['tests'][$i]['header'] = $this->gettext('forbiddenchars');
- }
+ }
}
if (empty($this->errors['tests'][$i]['header']))
- $cust_header = $headers;
+ $cust_header = (is_array($headers) && count($headers) == 1) ? $headers[0] : $headers;
if ($type == 'exists')
{