From b362099af3906a7e8b5ef2a889e2a41160c9fd3e Mon Sep 17 00:00:00 2001 From: james Date: Fri, 12 Feb 2010 17:05:18 +0000 Subject: [PATCH] If the xml parse doesnt return an array, then the server must have sent back plain text, so set the message and error field to that and return it. This is what the YSC Stats server does - So stats uploading to YSC works again now. --- admin/curl.inc.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/admin/curl.inc.php b/admin/curl.inc.php index 2d6b4c85..ee122df7 100644 --- a/admin/curl.inc.php +++ b/admin/curl.inc.php @@ -111,6 +111,12 @@ $datastream = str_replace(" standalone=\"yes\"","",$datastream); /* Return is XML, make a return array */ $response=xml_parsexml($datastream); + + if(!is_array($response)) { + $ret['message']=$datastream; + $ret['error']=0; + return $ret; + } /* De-array everything */ xml_dearray($response); $key = array_keys($response);