summaryrefslogtreecommitdiff
path: root/plugins/managesieve/managesieve.php
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2009-05-28 07:03:31 +0000
committeralecpl <alec@alec.pl>2009-05-28 07:03:31 +0000
commit36e52648faa3bed3ee10c042e4d6ab281a5cca58 (patch)
tree345e39f9f9b77fb53b550589390ebdbfdb8f9ba7 /plugins/managesieve/managesieve.php
parenta1fc8d2518f65049a6286c00b1e8f71fbfc0dc51 (diff)
- header lists: change one-item array to string
Diffstat (limited to 'plugins/managesieve/managesieve.php')
-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')
{