[horde] Converting stdClass object trees to arrays?
Michael J Rubinsky
mrubinsk at horde.org
Mon Apr 25 18:43:43 UTC 2011
Adam Tauno Williams <awilliam at whitemice.org> wrote:
>I'm updating our Auth and Group providers for the latest Horde release.
>These communicate with our backend server using JSON-RPC 1.1. So I'm
>using the Horde_Rpc_Jsonrpc::request class/method. That part is
>working
>very well [switching from XML-RPC which we used previously].
>
>In $response->result is the results of the JSON-RPC call. But these are
>stdClass object trees, not 'arrays'. So in some pages I get errors
>like
>-
>
>PHP Fatal error: Cannot use object of type stdClass as array
>in /srv/www/htdocs/horde/templates/admin/groups/edit.inc on line 7
>
>Is the a standard / horde-ish way to convert the deserialized responses
>to arrays?
>
>--
>Horde mailing list
>Frequently Asked Questions: http://horde.org/faq/
>To unsubscribe, mail: horde-unsubscribe at lists.horde.org
Just cast the stdClass to an array.
--
Mike
Sent from mobile
More information about the horde
mailing list