summaryrefslogtreecommitdiffstats
path: root/12.patch
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2019-12-12 14:40:14 +0100
committerRemi Collet <remi@remirepo.net>2019-12-12 14:40:14 +0100
commit791eb72e0fc5ea987f89e8def58c5adb91342a9b (patch)
treed26ebb701d9794b8c4ab3b6ade8b5e5cca398452 /12.patch
parent7b4222a6860c851edbe0809568a3b6ffd86fe57d (diff)
add patch for XML_Util and PHP 7.4 from https://github.com/pear/XML_Util/pull/12
Diffstat (limited to '12.patch')
-rw-r--r--12.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/12.patch b/12.patch
new file mode 100644
index 0000000..48448bf
--- /dev/null
+++ b/12.patch
@@ -0,0 +1,24 @@
+From e2c9854408bc0b45206336060e28603de3371c99 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Thu, 12 Dec 2019 14:17:38 +0100
+Subject: [PATCH] fix Trying to access array offset on value of type int
+
+---
+ XML/Util.php | 2 +-
+ tests/IsValidNameTests.php | 24 ++++++++++++++++++++++++
+ 2 files changed, 25 insertions(+), 1 deletion(-)
+
+diff --git a/XML/Util.php b/XML/Util.php
+index df37e07..1ba45ac 100644
+--- a/XML/Util.php
++++ b/XML/Util.php
+@@ -918,7 +918,7 @@ public static function splitQualifiedName($qname, $defaultNs = null)
+ public static function isValidName($string)
+ {
+ // check for invalid chars
+- if (!preg_match('/^[[:alpha:]_]\\z/', $string[0])) {
++ if (!is_string($string) || !strlen($string) || !preg_match('/^[[:alpha:]_]\\z/', $string[0])) {
+ return XML_Util::raiseError(
+ 'XML names may only start with letter or underscore',
+ XML_UTIL_ERROR_INVALID_START
+