summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--12.patch24
-rw-r--r--php-pear.spec17
2 files changed, 35 insertions, 6 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
+
diff --git a/php-pear.spec b/php-pear.spec
index 710979b..e8e0424 100644
--- a/php-pear.spec
+++ b/php-pear.spec
@@ -40,7 +40,7 @@
Summary: PHP Extension and Application Repository framework
Name: %{?scl_prefix}php-pear
Version: 1.10.10
-Release: 4%{?dist}
+Release: 5%{?dist}
Epoch: 1
# PEAR, PEAR_Manpages, Archive_Tar, XML_Util, Console_Getopt are BSD
# Structures_Graph is LGPLv3+
@@ -61,6 +61,8 @@ Source23: http://pear.php.net/get/Structures_Graph-%{structver}.tgz
Source24: http://pear.php.net/get/XML_Util-%{xmlutil}.tgz
Source25: http://pear.php.net/get/PEAR_Manpages-%{manpages}.tgz
+Patch0: https://patch-diff.githubusercontent.com/raw/pear/XML_Util/pull/12.patch
+
BuildArch: noarch
BuildRequires: %{?scl_prefix}php(language) > 5.4
BuildRequires: %{?scl_prefix}php-cli
@@ -277,7 +279,7 @@ install -m 644 -D macros.pear \
# apply patches on installed PEAR tree
pushd %{buildroot}%{peardir}
-: no patch
+patch -p1 < %{PATCH0}
popd
# Why this file here ?
@@ -322,10 +324,9 @@ phpunit \
AllTests || ret=1
cd %{buildroot}%{_datadir}/tests/pear/XML_Util/tests
-%{_bindir}/php \
- %{buildroot}/usr/share/pear/pearcmd.php \
- run-tests \
- | tee $LOG
+phpunit \
+ --bootstrap=/usr/share/pear/XML/Util/autoload.php \
+ --test-suffix .php . || ret=1
cd %{buildroot}%{_datadir}/tests/pear/Console_Getopt/tests
%{_bindir}/php \
@@ -463,6 +464,10 @@ fi
%changelog
+* Thu Dec 12 2019 Remi Collet <remi@remirepo.net> - 1:1.10.10-5
+- add patch for XML_Util and PHP 7.4 from
+ https://github.com/pear/XML_Util/pull/12
+
* Fri Dec 6 2019 Remi Collet <remi@remirepo.net> - 1:1.10.10-4
- update XML_Util to 1.4.4
- drop patch merged upstream