When calling xmlrpc on an unknown host Drupal fails with the following exception:
PHP Fatal error: Call to undefined method Guzzle\\Http\\Exception\\CurlException::getMethod() in /core/modules/xmlrpc/xmlrpc.inc on line 575.
I had to change the class of the exception object to make this work (posting code rather than patch as I am not sure it is the right fix):
diff --git a/core/modules/xmlrpc/xmlrpc.inc b/core/modules/xmlrpc/xmlrpc.inc
index 445993a..33d2fc5 100644
--- a/core/modules/xmlrpc/xmlrpc.inc
+++ b/core/modules/xmlrpc/xmlrpc.inc
@@ -571,7 +571,7 @@ function _xmlrpc($url, array $args, array $headers = array()) {
xmlrpc_error($response->getStatusCode(), $response->getReasonPhrase());
return FALSE;
}
- catch (RequestException $exception) {
+ catch (GuzzleException $exception) {
xmlrpc_error(NULL, $exception->getMethod());
return FALSE;
}
By the way, I tried to do use print_r() on the exception object and even with a memory limit set to 1024M I did not succeed:
PHP Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 1068503041 bytes) in /core/modules/xmlrpc/xmlrpc.inc on line 576.
Comments
Comment #1
gregglesAfter #1285726-48: Remove XML-RPC moving this to the contributed module home for xmlrpc issues.
Comment #2
fgmThis is no longer relevant : the core httpClient()->post() now throws a RequestException again, not a GuzzleException, so the problem no longer happens.