summaryrefslogtreecommitdiffstats
path: root/php-jms-serializer-php8.patch
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2021-03-31 14:03:28 +0200
committerRemi Collet <remi@remirepo.net>2021-03-31 14:03:28 +0200
commit44dca9040727d7c3277dda219d79f4be21c11cf2 (patch)
tree8c95f0af1dfe8d8c60417f414acf88d08878e10e /php-jms-serializer-php8.patch
parent906be05fb5f3b13f19393f185bb3f876cd286105 (diff)
add minimal fix for PHP 8HEADmaster
Diffstat (limited to 'php-jms-serializer-php8.patch')
-rw-r--r--php-jms-serializer-php8.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/php-jms-serializer-php8.patch b/php-jms-serializer-php8.patch
new file mode 100644
index 0000000..cfe41ab
--- /dev/null
+++ b/php-jms-serializer-php8.patch
@@ -0,0 +1,30 @@
+diff -up ./src/JMS/Serializer/XmlDeserializationVisitor.php.php8 ./src/JMS/Serializer/XmlDeserializationVisitor.php
+--- ./src/JMS/Serializer/XmlDeserializationVisitor.php.php8 2021-03-31 13:54:50.261719313 +0200
++++ ./src/JMS/Serializer/XmlDeserializationVisitor.php 2021-03-31 13:54:57.315695261 +0200
+@@ -48,7 +48,7 @@ class XmlDeserializationVisitor extends
+ $previous = libxml_use_internal_errors(true);
+ libxml_clear_errors();
+
+- $previousEntityLoaderState = libxml_disable_entity_loader($this->disableExternalEntities);
++ $previousEntityLoaderState = @libxml_disable_entity_loader($this->disableExternalEntities);
+
+ if (false !== stripos($data, '<!doctype')) {
+ $internalSubset = $this->getDomDocumentTypeEntitySubset($data);
+@@ -63,7 +63,7 @@ class XmlDeserializationVisitor extends
+ $doc = simplexml_load_string($data);
+
+ libxml_use_internal_errors($previous);
+- libxml_disable_entity_loader($previousEntityLoaderState);
++ @libxml_disable_entity_loader($previousEntityLoaderState);
+
+ if (false === $doc) {
+ throw new XmlErrorException(libxml_get_last_error());
+@@ -176,7 +176,7 @@ class XmlDeserializationVisitor extends
+ $nodes = $data->xpath($entryName);
+ }
+
+- if (!\count($nodes)) {
++ if (!($nodes && \count($nodes))) {
+ if (null === $this->result) {
+ return $this->result = array();
+ }