projects
/
horde.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2239c27
)
Check if unserialization failed.
author
Jan Schneider
<jan@horde.org>
Mon, 23 Aug 2010 13:07:41 +0000
(15:07 +0200)
committer
Jan Schneider
<jan@horde.org>
Mon, 23 Aug 2010 13:07:41 +0000
(15:07 +0200)
turba/lib/Turba.php
patch
|
blob
|
history
diff --git
a/turba/lib/Turba.php
b/turba/lib/Turba.php
index
fc53c6b
..
63faa61
100644
(file)
--- a/
turba/lib/Turba.php
+++ b/
turba/lib/Turba.php
@@
-587,7
+587,7
@@
class Turba {
/* Add the new addressbook to the user's list of visible address
* books. */
$prefs = json_decode($GLOBALS['prefs']->getValue('addressbooks'));
- if (array_search($share_id, $prefs) === false) {
+ if (
!is_array($prefs) ||
array_search($share_id, $prefs) === false) {
$prefs[] = $share_id;
$GLOBALS['prefs']->setValue('addressbooks', json_encode($prefs));
}