Fix compatibility with php 7.2
authorgggeek <giunta.gaetano@gmail.com>
Sun, 3 Sep 2017 17:52:10 +0000 (18:52 +0100)
committergggeek <giunta.gaetano@gmail.com>
Sun, 3 Sep 2017 17:52:10 +0000 (18:52 +0100)
.travis.yml
src/Request.php

index 38878b6..1ff5d12 100644 (file)
@@ -7,6 +7,7 @@ php:
   - 5.6
   - 7.0
   - 7.1
+  - 7.2
   # hhvm is not available any more on default travis images
   #- hhvm
 
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';