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

René Jensen lundeman@tbkol.dk
Tue Oct 29 08:32:25 2002


This message is in MIME format.

---------------------- multipart/mixed attachment
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().

Again.. thanx a million.. 

         _\|/_
         (@ @)
-----oOOo-(_)-oOOo-----
      René Jensen
   lundeman@tbkol.dk

---------------------- multipart/mixed attachment
Index: RPC.php
===================================================================
RCS file: /repository/horde/lib/RPC.php,v
retrieving revision 1.6
diff -u -r1.6 RPC.php
--- RPC.php	28 Oct 2002 21:29:33 -0000	1.6
+++ RPC.php	29 Oct 2002 07:22:04 -0000
@@ -105,8 +105,7 @@
         if (!$registry->hasMethod($method)) {
             return sprintf(_("Method '%s' is not defined"), $method);
         }
-
-        return $registry->call($method, $params);
+        return $registry->call($method, $params[0]);
     }
 
     /**

---------------------- multipart/mixed attachment--