From dddd282052196dd8ae6851e3abc0536d4f49b3b1 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 30 Jul 2021 15:48:11 +0200 Subject: [PATCH 1/2] fix for laminas/escaper 2.8 --- src/Formatter/Xml.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Formatter/Xml.php b/src/Formatter/Xml.php index c7240578..7bc25b90 100644 --- a/src/Formatter/Xml.php +++ b/src/Formatter/Xml.php @@ -232,7 +232,7 @@ protected function buildElementTree(DOMDocument $doc, DOMElement $rootElement, $ $value = $this->getEscaper()->escapeHtml( '"Object" of type ' . get_class($value) . " does not support __toString() method" ); - } else { + } else if ($value) { $value = $this->getEscaper()->escapeHtml($value); } From 089bec7c24b16bd27887f8111eb8755f29d29cad Mon Sep 17 00:00:00 2001 From: Marco Pivetta Date: Fri, 3 Dec 2021 10:56:35 +0100 Subject: [PATCH 2/2] s/else if/elseif (as per CS rules) --- src/Formatter/Xml.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Formatter/Xml.php b/src/Formatter/Xml.php index 7bc25b90..28e57268 100644 --- a/src/Formatter/Xml.php +++ b/src/Formatter/Xml.php @@ -232,7 +232,7 @@ protected function buildElementTree(DOMDocument $doc, DOMElement $rootElement, $ $value = $this->getEscaper()->escapeHtml( '"Object" of type ' . get_class($value) . " does not support __toString() method" ); - } else if ($value) { + } elseif ($value) { $value = $this->getEscaper()->escapeHtml($value); }