6.0.0-beta1
7/4/25

[#12104] Nag throwing PHP error
Summary Nag throwing PHP error
Queue Nag
Queue Version 4.0.2
Type Bug
State Not A Bug
Priority 1. Low
Owners
Requester torben (at) dannhauer (dot) info
Created 03/09/2013 (4500 days ago)
Due
Updated 03/11/2013 (4498 days ago)
Assigned 03/09/2013 (4500 days ago)
Resolved 03/11/2013 (4498 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
03/11/2013 01:00:43 PM Jan Schneider Taken from Michael Rubinsky
State ⇒ Not A Bug
 
03/11/2013 12:41:33 PM torben (at) dannhauer (dot) info Comment #4 Reply to this comment
Hmm,

forget that, it seems ther was something returned but crappy. restting 
each users personal setting seems to solve the issue.

Was something important changed in the serializer/pref-storage 
routines in the last month?
03/11/2013 12:03:14 PM torben (at) dannhauer (dot) info Comment #3 Reply to this comment
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




03/09/2013 02:55:11 PM Michael Rubinsky Comment #2
Priority ⇒ 1. Low
State ⇒ Feedback
Assigned to Michael Rubinsky
Reply to this comment
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?
03/09/2013 09:20:12 AM torben (at) dannhauer (dot) info Comment #1
Priority ⇒ 3. High
Type ⇒ Bug
Summary ⇒ Nag throwing PHP error
Queue ⇒ Nag
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
Reply to this comment
Horde throws a lot of PHP errors:

HORDE: [nag] PHP ERROR: array_flip() [<a 
href='function.array-flip'>function.array-flip</a>]: Can only flip 
STRING and INTEGER values! [pid 8825 on line 1603 of 
"/usr/share/php/www/horde/nag/lib/Nag.php"]

This seems also to break calender syncronization via ActiveSync at all!

Saved Queries