From: gggeek Date: Sun, 3 Sep 2017 17:52:10 +0000 (+0100) Subject: Fix compatibility with php 7.2 X-Git-Tag: 4.2.1~4 X-Git-Url: http://git.onelab.eu/?p=plcapi.git;a=commitdiff_plain;h=37782a719db2fbe02fe3462edcb06e89f6d58aac Fix compatibility with php 7.2 --- diff --git a/.travis.yml b/.travis.yml index 38878b6..1ff5d12 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,7 @@ php: - 5.6 - 7.0 - 7.1 + - 7.2 # hhvm is not available any more on default travis images #- hhvm diff --git a/src/Request.php b/src/Request.php index 4714489..54dc6c0 100644 --- a/src/Request.php +++ b/src/Request.php @@ -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 if ((xml_get_current_line_number($parser)) == 1) { $errStr = 'XML error at line 1, check URL';