Return the correct attribute value.
authorGunnar Wrobel <p@rdus.de>
Wed, 4 Nov 2009 15:16:53 +0000 (16:16 +0100)
committerGunnar Wrobel <p@rdus.de>
Wed, 4 Nov 2009 15:16:53 +0000 (16:16 +0100)
framework/Kolab_Server/lib/Horde/Kolab/Server/Object/Attribute/Value.php

index 0c4a76f..111c0fc 100644 (file)
@@ -37,7 +37,12 @@ extends Horde_Kolab_Server_Object_Attribute_Base
      */
     public function value()
     {
-        return $this->attribute->value();
+        $internal = $this->attribute->value();
+        if (isset($internal[$this->name])) {
+            return $internal[$this->name];
+        } else {
+            throw new Horde_Kolab_Server_Exception(sprintf('Missing value %s!', $this->name));
+        }
     }
 
     /**