Bail out if the imap_getannotation function is missing.
authorGunnar Wrobel <p@rdus.de>
Thu, 30 Dec 2010 10:48:06 +0000 (11:48 +0100)
committerGunnar Wrobel <p@rdus.de>
Tue, 4 Jan 2011 07:54:18 +0000 (08:54 +0100)
framework/Kolab_Storage/lib/Horde/Kolab/Storage/Driver/Cclient.php

index 9100e72..6a795d7 100644 (file)
@@ -170,6 +170,11 @@ extends Horde_Kolab_Storage_Driver_Base
      */
     public function listAnnotation($annotation)
     {
+        if (!function_exists('imap_getannotation')) {
+            throw new Horde_Kolab_Storage_Exception(
+                'This driver is not supported by your variant of PHP. The function "imap_getannotation" is missing!'
+            );
+        }
         list($entry, $value) = $this->_getAnnotateMoreEntry($annotation);
         $list = array();
         foreach ($this->getMailboxes() as $mailbox) {