error on xmlrpc call

squaretone - May 1, 2007 - 16:58
Project:Services
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

The module was working as expected on my testing server but when I moved to my production server I began getting an error when calling www.mysite.com/xmlrpc.php or www.mysite.com/services/xmlrpc

Turns out it was the call to return array_merge($defaults, $callbacks); on line 35 of xmlrpc_server.module. Maybe it is the level of error reporting my host has set for php but it became very cranky about $defaults not being defined.

I fixed it by changing

return array_merge($defaults, $callbacks);

to

if(is_array($defaults)){
   return array_merge($defaults, $callbacks);
}else{
  return $callbacks;
}

Not sure if this is the most elegant solution but it is working for me thus-far.

#1

snelson - July 15, 2007 - 07:26
Status:active» fixed

$defaults didn't even need to be there anymore, so I just took it out. Committed.

#2

Anonymous - July 29, 2007 - 07:30
Status:fixed» closed
 
 

Drupal is a registered trademark of Dries Buytaert.