]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/class-IXR.php
Wordpress 3.0
[autoinstalls/wordpress.git] / wp-includes / class-IXR.php
index f8d61fe82423abaa3a2cb36af232e9336e6351c4..49f80b0ca78a6677cdf143337b7b66e2d141040c 100644 (file)
@@ -356,7 +356,7 @@ EOD;
             $args = $args[0];
         }
         // Are we dealing with a function or a method?
-        if (substr($method, 0, 5) == 'this:') {
+        if ( is_string( $method ) && substr($method, 0, 5) == 'this:' ) {
             // It's a class method - check it exists
             $method = substr($method, 5);
             if (!method_exists($this, $method)) {
@@ -581,7 +581,8 @@ class IXR_Client {
                 $gettingHeaders = false;
             }
             if (!$gettingHeaders) {
-                $contents .= trim($line);
+               // WP#12559 remove trim so as to not strip newlines from received response.
+                $contents .= $line;
             }
             if ($this->debug) {
                 $debug_contents .= $line;