From a128876c1cc70e9524e8d08e707829224cb2721d Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 22 Feb 2017 12:59:43 +0100 Subject: php-pear add patch to fix XML_Serializer with XML_Util 1.4.1 --- XML_Util-pr8.patch | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 XML_Util-pr8.patch (limited to 'XML_Util-pr8.patch') diff --git a/XML_Util-pr8.patch b/XML_Util-pr8.patch new file mode 100644 index 0000000..2a41893 --- /dev/null +++ b/XML_Util-pr8.patch @@ -0,0 +1,26 @@ +From 59e2d9738dd25cd751b810e5431b96e836864152 Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Wed, 22 Feb 2017 11:39:37 +0100 +Subject: [PATCH] Fix #21184, collapseEmptyTags breaks XML_Serializer + +--- + XML/Util.php | 2 +- + package.xml | 1 + + tests/Bug21184Tests.php | 18 ++++++++++++++++++ + 3 files changed, 20 insertions(+), 1 deletion(-) + create mode 100644 tests/Bug21184Tests.php + +diff --git a/XML/Util.php b/XML/Util.php +index af8211b..0bb7e5e 100644 +--- a/XML/Util.php ++++ b/XML/Util.php +@@ -483,7 +483,7 @@ public static function collapseEmptyTags($xml, $mode = XML_UTIL_COLLAPSE_ALL) + '${4}' . // attributes + ' />' + ; +- return preg_replace($preg1, $preg2, $xml); ++ return (preg_replace($preg1, $preg2, $xml)?:$xml); + break; + case XML_UTIL_COLLAPSE_XHTML_ONLY: + return preg_replace( + -- cgit