From 3a1dad2d15fb82250c76f4ff1ec789d14d38d4fc Mon Sep 17 00:00:00 2001 From: Dennis Ploeger Date: Fri, 12 Oct 2007 15:59:30 +0200 Subject: xmlrpc_putpage Adds the putpage-method to the xmlrpc-server-code darcs-hash:20071012135930-b8925-1d770de41b3e6aea4c612666194e915dda344647.gz --- inc/IXR_Library.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'inc') diff --git a/inc/IXR_Library.php b/inc/IXR_Library.php index 723b0f39a..5a4859813 100644 --- a/inc/IXR_Library.php +++ b/inc/IXR_Library.php @@ -714,8 +714,9 @@ class IXR_IntrospectionServer extends IXR_Server { $method = $this->callbacks[$methodname]; $signature = $this->signatures[$methodname]; $returnType = array_shift($signature); - // Check the number of arguments - if (count($args) != count($signature)) { + // Check the number of arguments. Check only, if the minimum count of parameters is specified. More parameters are possible. + // This is a hack to allow optional parameters... + if (count($args) < count($signature)) { // print 'Num of args: '.count($args).' Num in signature: '.count($signature); return new IXR_Error(-32602, 'server error. wrong number of method parameters'); } -- cgit v1.2.3