cvs: pear /XML_RPC RPC.php
| From: | Tomas V.V.Cox | Date: | Wed, 22 May 2002 00:23:53 +0000 |
| Subject: | cvs: pear /XML_RPC RPC.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-4026@lists.php.net to get a copy of this message | ||
cox Tue May 21 20:23:53 2002 EDT
Modified files:
/pear/XML_RPC RPC.php
Log:
Print nicier debug output when no web env is detected
Index: pear/XML_RPC/RPC.php
diff -u pear/XML_RPC/RPC.php:1.8 pear/XML_RPC/RPC.php:1.9
--- pear/XML_RPC/RPC.php:1.8 Tue May 21 20:22:15 2002
+++ pear/XML_RPC/RPC.php Tue May 21 20:23:53 2002
@@ -1,7 +1,7 @@
<?php
// by Edd Dumbill (C) 1999-2001
// <edd@usefulinc.com>
-// $Id: RPC.php,v 1.8 2002/05/22 00:22:15 cox Exp $
+// $Id: RPC.php,v 1.9 2002/05/22 00:23:53 cox Exp $
// License is granted to use or modify this software ("XML-RPC for PHP")
// for commercial or non-commercial use provided the copyright of the author
@@ -624,9 +624,11 @@
$xmlrpc_value = new XML_RPC_Value;
$hdrfnd=0;
- if ($this->debug)
- print "<PRE>---GOT---\n" . htmlspecialchars($data) .
- "\n---END---\n</PRE>";
+ if ($this->debug) {
+ print "<PRE>---GOT---\n";
+ print isset($_SERVER['SERVER_PROTOCOL']) ? htmlspecialchars($data) : $data;
+ print "\n---END---\n</PRE>";
+ }
// see if we got an HTTP 200 OK, else bomb
// but only do this if we're using the HTTP protocol.
if (ereg("^HTTP",$data) &&