Update for php 7.2 compatibility issue
authormorloi <morloi@morloi.org>
Tue, 3 Apr 2018 13:52:45 +0000 (15:52 +0200)
committerGitHub <noreply@github.com>
Tue, 3 Apr 2018 13:52:45 +0000 (15:52 +0200)
Getting rid of "Warning: count(): Parameter must be an array or an object that implements Countable" that Php 7.2 throws

lib/xmlrpc.inc

index 7123184..80bdf72 100644 (file)
@@ -2684,7 +2684,7 @@ xmlrpc_encode_entitites($this->errstr, $GLOBALS['xmlrpc_internalencoding'], $cha
                        xml_set_default_handler($parser, 'xmlrpc_dh');\r
 \r
                        // first error check: xml not well formed\r
-                       if(!xml_parse($parser, $data, count($data)))\r
+                       if(!xml_parse($parser, $data, 1))\r
                        {\r
                                // thanks to Peter Kocks <peter.kocks@baygate.com>\r
                                if((xml_get_current_line_number($parser)) == 1)\r
@@ -3919,4 +3919,4 @@ xmlrpc_encode_entitites($this->errstr, $GLOBALS['xmlrpc_internalencoding'], $cha
                }\r
        }\r
 \r
-?>
\ No newline at end of file
+?>\r