* @author Martin Jansen <mj@php.net>
* @author Daniel Convissor <danielc@php.net>
* @copyright 1999-2001 Edd Dumbill, 2001-2005 The PHP Group
- * @version CVS: $Id: RPC.php,v 1.76 2005/06/29 12:22:29 toby Exp $
+ * @version CVS: $Id: RPC.php,v 1.79 2005/07/07 01:08:28 danielc Exp $
* @link http://pear.php.net/package/XML_RPC
*/
* @author Martin Jansen <mj@php.net>
* @author Daniel Convissor <danielc@php.net>
* @copyright 1999-2001 Edd Dumbill, 2001-2005 The PHP Group
- * @version Release: @package_version@
+ * @version Release: 1.3.2
* @link http://pear.php.net/package/XML_RPC
*/
class XML_RPC_Base {
* @author Martin Jansen <mj@php.net>
* @author Daniel Convissor <danielc@php.net>
* @copyright 1999-2001 Edd Dumbill, 2001-2005 The PHP Group
- * @version Release: @package_version@
+ * @version Release: 1.3.2
* @link http://pear.php.net/package/XML_RPC
*/
class XML_RPC_Client extends XML_RPC_Base {
* @author Martin Jansen <mj@php.net>
* @author Daniel Convissor <danielc@php.net>
* @copyright 1999-2001 Edd Dumbill, 2001-2005 The PHP Group
- * @version Release: @package_version@
+ * @version Release: 1.3.2
* @link http://pear.php.net/package/XML_RPC
*/
class XML_RPC_Response extends XML_RPC_Base
* @author Martin Jansen <mj@php.net>
* @author Daniel Convissor <danielc@php.net>
* @copyright 1999-2001 Edd Dumbill, 2001-2005 The PHP Group
- * @version Release: @package_version@
+ * @version Release: 1.3.2
* @link http://pear.php.net/package/XML_RPC
*/
class XML_RPC_Message extends XML_RPC_Base
$r = new XML_RPC_Response(0, $XML_RPC_err['invalid_return'],
$XML_RPC_str['invalid_return']);
} else {
- eval('$v=' . $XML_RPC_xh[$parser]['st'] . '; $allOK=1;');
+ @eval('$v=' . $XML_RPC_xh[$parser]['st'] . '; $allOK=1;');
if ($XML_RPC_xh[$parser]['isf']) {
$f = $v->structmem('faultCode');
$fs = $v->structmem('faultString');
* @author Martin Jansen <mj@php.net>
* @author Daniel Convissor <danielc@php.net>
* @copyright 1999-2001 Edd Dumbill, 2001-2005 The PHP Group
- * @version Release: @package_version@
+ * @version Release: 1.3.2
* @link http://pear.php.net/package/XML_RPC
*/
class XML_RPC_Value extends XML_RPC_Base
*/
function serializeval($o)
{
- $rs = '';
+ if (!is_object($o) || empty($o->me) || !is_array($o->me)) {
+ return '';
+ }
$ar = $o->me;
reset($ar);
list($typ, $val) = each($ar);
- $rs .= '<value>';
- $rs .= $this->serializedata($typ, $val);
- $rs .= "</value>\n";
- return $rs;
+ return '<value>' . $this->serializedata($typ, $val) . "</value>\n";
}
/**
$t[$id] = $cont->scalarval();
}
foreach ($t as $id => $cont) {
- eval('$b->'.$id.' = $cont;');
+ @eval('$b->'.$id.' = $cont;');
}
}
* @author Martin Jansen <mj@php.net>
* @author Daniel Convissor <danielc@php.net>
* @copyright 1999-2001 Edd Dumbill, 2001-2005 The PHP Group
- * @version CVS: $Id: Server.php,v 1.26 2005/05/09 21:39:47 danielc Exp $
+ * @version CVS: $Id: Server.php,v 1.28 2005/07/07 01:21:29 danielc Exp $
* @link http://pear.php.net/package/XML_RPC
*/
/**
* Pull in the XML_RPC class
*/
-require_once dirname(__FILE__) . '/../RPC.php';
+require_once 'XML/RPC.php';
/**
* @author Martin Jansen <mj@php.net>
* @author Daniel Convissor <danielc@php.net>
* @copyright 1999-2001 Edd Dumbill, 2001-2005 The PHP Group
- * @version Release: @package_version@
+ * @version Release: 1.3.2
* @link http://pear.php.net/package/XML_RPC
*/
class XML_RPC_Server
*/
function service()
{
- $this->createServerPayload();
- $this->createServerHeaders();
+ if (!$this->server_payload) {
+ $this->createServerPayload();
+ }
+ if (!$this->server_headers) {
+ $this->createServerHeaders();
+ }
header($this->server_headers);
print $this->server_payload;
}
for ($i = 0; $i < sizeof($XML_RPC_xh[$parser]['params']); $i++) {
// print '<!-- ' . $XML_RPC_xh[$parser]['params'][$i]. "-->\n";
$plist .= "$i - " . $XML_RPC_xh[$parser]['params'][$i] . " \n";
- eval('$m->addParam(' . $XML_RPC_xh[$parser]['params'][$i] . ');');
+ @eval('$m->addParam(' . $XML_RPC_xh[$parser]['params'][$i] . ');');
}
XML_RPC_Server_debugmsg($plist);