summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Machniak <machniak@kolabsys.com>2013-04-19 12:27:48 (GMT)
committerAleksander Machniak <machniak@kolabsys.com>2013-04-19 12:27:48 (GMT)
commit4a0c47de0b16ce5f0abaac5e0a2349d1b7dd246b (patch)
tree5cc1e131ee2e5ebbf46aedfa03801123dcbe4088
parente03156fc1f03c9968915c31aa63cfdcd5b5099d9 (diff)
downloadroundcubemail-plugins-kolab-4a0c47de0b16ce5f0abaac5e0a2349d1b7dd246b.tar.gz
Fix unintentional $this->data modification in get_tags()
-rw-r--r--plugins/libkolab/lib/kolab_format_file.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/libkolab/lib/kolab_format_file.php b/plugins/libkolab/lib/kolab_format_file.php
index 3fffa89..a71a794 100644
--- a/plugins/libkolab/lib/kolab_format_file.php
+++ b/plugins/libkolab/lib/kolab_format_file.php
@@ -132,7 +132,10 @@ class kolab_format_file extends kolab_format
// Add file mimetype to tags
if (!empty($this->data['_attachments'])) {
- $attachment = array_shift($this->data['_attachments']);
+ reset($this->data['_attachments']);
+ $key = key($this->data['_attachments']);
+ $attachment = $this->data['_attachments'][$key];
+
if ($attachment['mimetype']) {
$tags[] = $attachment['mimetype'];
}