From 1bd573752fcdc21f26780258029ed38b90093ed7 Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Sat, 14 Apr 2018 15:31:00 -0700 Subject: [PATCH] PHPVersionCheck: Properly check for `xml` extension in PHP 7.2+ In 7.2, the `utf8_encode` function was moved into core PHP, and is no longer a part of the `xml` extension. Use a different function to check for the existence of it. Change-Id: Ib50c1a59dd9c2a8777b07b2f7a3dd638a55832c6 (cherry picked from commit 9e5785b7204e6a927e7f60ce4cbdeedad8f45818) --- includes/PHPVersionCheck.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/PHPVersionCheck.php b/includes/PHPVersionCheck.php index a7ece4d579..af3ae91141 100644 --- a/includes/PHPVersionCheck.php +++ b/includes/PHPVersionCheck.php @@ -30,7 +30,7 @@ class PHPVersionCheck { var $mwVersion = '1.31'; var $functionsExtensionsMapping = array( 'mb_substr' => 'mbstring', - 'utf8_encode' => 'xml', + 'xml_parser_create' => 'xml', 'ctype_digit' => 'ctype', 'json_decode' => 'json', 'iconv' => 'iconv', -- 2.20.1