From f0734fb79ccc880c8fdebe745b789438da236760 Mon Sep 17 00:00:00 2001 From: Peter Westwood Date: Fri, 23 Jan 2009 22:30:23 +0000 Subject: [PATCH] Make the IXR debug classy. See #8916 props wnorris git-svn-id: https://develop.svn.wordpress.org/trunk@10423 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/class-IXR.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/wp-includes/class-IXR.php b/wp-includes/class-IXR.php index 3eaf8e2e28..7d678fdf7d 100644 --- a/wp-includes/class-IXR.php +++ b/wp-includes/class-IXR.php @@ -543,7 +543,7 @@ class IXR_Client { $request .= $xml; // Now send the request if ($this->debug) { - echo '
'.htmlspecialchars($request)."\n
\n\n"; + echo '
'.htmlspecialchars($request)."\n
\n\n"; } if ($this->timeout) { $fp = @fsockopen($this->server, $this->port, $errno, $errstr, $this->timeout); @@ -574,9 +574,12 @@ class IXR_Client { if (!$gettingHeaders) { $contents .= trim($line); } + if ($this->debug) { + $debug_contents .= $line; + } } if ($this->debug) { - echo '
'.htmlspecialchars($contents)."\n
\n\n"; + echo '
'.htmlspecialchars($debug_contents)."\n
\n\n"; } // Now parse what we've got back $this->message = new IXR_Message($contents);