Fix compatibility with php 7.2
[plcapi.git] / src / Request.php
index 4714489..54dc6c0 100644 (file)
@@ -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';