[dev] A little fix for RPC.php (was:bug in Group.php ??)

Jan Schneider jan@horde.org
Tue Oct 29 09:19:52 2002


Zitat von René Jensen <lundeman@tbkol.dk>:

> Citat Jan Schneider <jan@horde.org>:
> 
> > This is now fixed in CVS.
> >
> > Jan.
> >
> 
> Thanx a million Jan...
> 
> I just came across one difference from calling methods via RPC and
> callByPackage.
> 
> The RPC server seems to wrap all parameters in an array.
> So that
> array('username' => 'lundeman')
> becomes
> array(array('username' => 'lundeman')
> this diff does the trick for me..
> 
> Basicly it just takes the first entry of $params in _dispatcher
> and uses that when calling $registry->call().

I can't follow this. This is how I test the server:

$response = RPC::request('/headhorde/rpc.php', 'localhost', 80,
'contacts.search', array(array('jan'), array('localsql'), array('name',
'email')), Auth::getAuth(), Auth::getCredential('password'));

That's not the best example because contacts/search itself take arrays as
its parameter, but you get the point. All parameters to contacts/search are
passed in one array and the dispatcher get this parameter also as an array.
Registry::call() at the end of this chain also takes its parameters as an
array. Am I anything missing here?

Jan.

--
http://www.horde.org - The Horde Project
http://www.ammma.de - discover your knowledge
http://www.tip4all.de - Deine private Tippgemeinschaft