Merge pull request #56 from glensc/accept-header
[plcapi.git] / src / Request.php
index 0051e46..54dc6c0 100644 (file)
@@ -109,7 +109,7 @@ class Request
      */
     public function addParam($param)
     {
-        // add check: do not add to self params which are not xmlrpc values
+        // check: do not add to self params which are not xmlrpc values
         if (is_object($param) && is_a($param, 'PhpXmlRpc\Value')) {
             $this->params[] = $param;
 
@@ -288,7 +288,7 @@ class Request
         xml_set_default_handler($parser, 'xmlrpc_dh');
 
         // first error check: xml not well formed
-        if (!xml_parse($parser, $data, count($data))) {
+        if (!xml_parse($parser, $data, 1)) {
             // thanks to Peter Kocks <peter.kocks@baygate.com>
             if ((xml_get_current_line_number($parser)) == 1) {
                 $errStr = 'XML error at line 1, check URL';