6.0.0-beta1
▾
Tasks
New Task
Search
Photos
Wiki
▾
Tickets
New Ticket
Search
dev.horde.org
Toggle Alerts Log
Help
10/18/25
H
istory
A
ttachments
C
omment
W
atch
Download
Comment on [#5604] ListMessages endless loop
*
Your Email Address
*
Spam protection
Enter the letters below:
.__ . . ..__..__ [ __| | || || \ [_./|___|/\||__\|__/
Comment
>> Yes, PHP on CentOS5 doesn't have json extension. If I use var_export > >> on original code, I get this output: > >> > >> 'msglist' => > >> stdClass::__set_state(array( > >> )), > >> > >> but when I remove typecast to "object", I get different output: > >> > >> 'msglist' => > >> array ( > >> 1 => 1, > >> 2 => 2, > >> 3 => 3, > >> ), > > > > That's weird; that actually indicates to me a PHP bug, that you're > losing the values of the array when casting it to an object. > > > > We need to cast it to an object, otherwise the JSON would probably > look like this: > > > > [1, 2, 3] > > > > instead of: > > > > {'1': 1, '2': 2, '3': 3} > > > > (which is important when it's 10048, 10051, 10046, in that order, and > not just 1, 2, 3). > > > > Can you make a short test script which is just: > > > > <?php > > > > var_dump((object)array('1' => 1, '2' => 2)); > > echo var_export((object)array('1' => 1, '2' => 2), true); > > > > > > And run it on both versions? (interestingly, the var_export might > just mangle it. The var_dump is okay in my case though. Looks like it > might be a bug in our json encoder, except that it's weird that the > effect of var_export is exactly what you see when using var_export on > it ...)
Attachment
Watch this ticket
N
ew Ticket
M
y Tickets
S
earch
Q
uery Builder
R
eports
Saved Queries
Open Bugs
Bugs waiting for Feedback
Open Bugs in Releases
Open Enhancements
Enhancements waiting for Feedback
Bugs with Patches
Enhancements with Patches
Release Showstoppers
Stalled Tickets
New Tickets
Horde 5 Showstoppers