[horde] Converting stdClass object trees to arrays?

Adam Tauno Williams awilliam at whitemice.org
Mon Apr 25 15:00:43 UTC 2011


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?



More information about the horde mailing list