From 2e8024fa8386ef02331ef6fea4840dc17bedf7b5 Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Wed, 20 Oct 2010 13:52:24 -0400 Subject: [PATCH] Get an array back from json_decode here. --- turba/lib/Turba.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/turba/lib/Turba.php b/turba/lib/Turba.php index c336b1a32..9a400ba42 100644 --- a/turba/lib/Turba.php +++ b/turba/lib/Turba.php @@ -598,7 +598,7 @@ class Turba { /* Add the new addressbook to the user's list of visible address * books. */ - $prefs = json_decode($GLOBALS['prefs']->getValue('addressbooks')); + $prefs = json_decode($GLOBALS['prefs']->getValue('addressbooks'), true); if (!is_array($prefs) || array_search($share_id, $prefs) === false) { $prefs[] = $share_id; $GLOBALS['prefs']->setValue('addressbooks', json_encode($prefs)); -- 2.11.0