[Tickets #12104] Re: Nag throwing PHP error
noreply at bugs.horde.org
noreply at bugs.horde.org
Mon Mar 11 12:03:14 UTC 2013
BITTE NICHT AUF DIESE NACHRICHT ANTWORTEN. NACHRICHTEN AN DIESE
E-MAIL-ADRESSE WERDEN NICHT GELESEN.
Ticket-URL: http://bugs.horde.org/ticket/12104
------------------------------------------------------------------------------
Ticket | 12104
Aktualisiert Von | torben at dannhauer.info
Zusammenfassung | Nag throwing PHP error
Warteschlange | Nag
Version | 4.0.2
Typ | Bug
Status | Feedback
Priorität | 1. Low
Milestone |
Patch |
Zuständige | Michael Rubinsky
------------------------------------------------------------------------------
torben at dannhauer.info (2013-03-11 12:03) hat geschrieben:
> I don't see this. I am successfully syncing calendar/contacts/tasks/email.
>
> What is the value being passed to array_flip()? You can try
> re-saving Nag's synchronization prefs via the UI, perhaps it got
> corrupted somehow?
Hi,
are you using tasks while syncing? I re-saved the prefs, it doesn't
help so I investigated the error a bit:
the mentioned error message is caused in horde/nag/lib/Nag.php in line 1603.
this line is located in the function "static public function getSyncLists()"
The first line festes the prefs an serializes the value:
$cs = unserialize($GLOBALS['prefs']->getValue('sync_lists'));
The returned array contains usually some content:
Array
(
[0] => or6rhw_UzWWoM8q5BrkCVA1
)
But sometimes it does not:
Array
(
[0] =>
)
As far as I know, the latter is not an empty array according to PHP
definition, so the following "if (!empty($cs)) "fails.
The above array is created by the function unserialize.
A debug revealed that "$GLOBALS['prefs']->getValue('sync_lists')" does
not reveal always a value. So unserialize (btw: in which file is that
unserialize function located?) should be fixed to return a proper
emtpy value if the input is NULL.
Thanks,
Torben
More information about the bugs
mailing list