Missed adding a json_decode().
authorJan Schneider <jan@horde.org>
Wed, 12 May 2010 14:36:50 +0000 (16:36 +0200)
committerJan Schneider <jan@horde.org>
Wed, 12 May 2010 14:36:50 +0000 (16:36 +0200)
turba/lib/Turba.php

index a468495..e13f763 100644 (file)
@@ -583,7 +583,7 @@ class Turba {
 
         /* Add the new addressbook to the user's list of visible address
          * books. */
-        $prefs = $GLOBALS['prefs']->getValue('addressbooks');
+        $prefs = json_decode($GLOBALS['prefs']->getValue('addressbooks'));
         if (array_search($share_id, $prefs) === false) {
             $prefs[] = $share_id;
             $GLOBALS['prefs']->setValue('addressbooks', json_encode($prefs));