diff options
author | Remi Collet <remi@remirepo.net> | 2020-08-24 10:02:11 +0200 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2020-08-24 10:02:11 +0200 |
commit | 38151369573fc0876d26c730fcce5ab7edbcbac3 (patch) | |
tree | e7f191e42e2e0f38ba777b59ff84d25ee5ad4811 | |
parent | f8def80fe07e0de222837b56389d8472891c0356 (diff) |
add upstream patch for test suite with PHP 8.0
-rw-r--r-- | d6f1583ffd408a9bbf1566d49c2bf099fce4e53a.patch | 22 | ||||
-rw-r--r-- | php-pecl-mailparse.spec | 9 |
2 files changed, 30 insertions, 1 deletions
diff --git a/d6f1583ffd408a9bbf1566d49c2bf099fce4e53a.patch b/d6f1583ffd408a9bbf1566d49c2bf099fce4e53a.patch new file mode 100644 index 0000000..5f7a10b --- /dev/null +++ b/d6f1583ffd408a9bbf1566d49c2bf099fce4e53a.patch @@ -0,0 +1,22 @@ +From d6f1583ffd408a9bbf1566d49c2bf099fce4e53a Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@php.net> +Date: Mon, 24 Aug 2020 09:58:55 +0200 +Subject: [PATCH] avoid "Undefined array key 1" with PHP 8 + +--- + tests/parse_test_messages.phpt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/parse_test_messages.phpt b/tests/parse_test_messages.phpt +index 49573e4..df98741 100644 +--- a/tests/parse_test_messages.phpt ++++ b/tests/parse_test_messages.phpt +@@ -17,7 +17,7 @@ $dir = opendir($testdir) or die("unable to open test dir!"); + $messages = array(); + + while (($f = readdir($dir)) !== false) { +- if ($f == "CVS" || $f == "." || $f == "..") ++ if ($f == "CVS" || $f == "." || $f == ".." || !strpos($f, '.')) + continue; + + list($name, $suffix) = explode(".", $f, 2); diff --git a/php-pecl-mailparse.spec b/php-pecl-mailparse.spec index 6973f28..3bb9acb 100644 --- a/php-pecl-mailparse.spec +++ b/php-pecl-mailparse.spec @@ -27,11 +27,13 @@ Summary: PHP PECL package for parsing and working with email messages Name: %{?sub_prefix}php-pecl-mailparse Version: 3.1.0 -Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Release: 3%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} License: PHP URL: https://pecl.php.net/package/mailparse Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz +Patch0: https://github.com/php/pecl-mail-mailparse/commit/d6f1583ffd408a9bbf1566d49c2bf099fce4e53a.patch + BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?scl_prefix}php-devel > 7 BuildRequires: %{?scl_prefix}php-pear @@ -97,6 +99,8 @@ sed -e 's/role="test"/role="src"/' \ -i package.xml cd NTS +%patch0 -p1 -b .up + extver=$(sed -n '/#define PHP_MAILPARSE_VERSION/{s/.* "//;s/".*$//;p}' php_mailparse.h) if test "x${extver}" != "x%{version}"; then : Error: Upstream version is ${extver}, expecting %{version}. @@ -222,6 +226,9 @@ fi %changelog +* Mon Aug 24 2020 Remi Collet <remi@remirepo.net> - 3.1.0-3 +- add upstream patch for test suite with PHP 8.0 + * Wed Apr 22 2020 Remi Collet <remi@remirepo.net> - 3.1.0-1 - update to 3.1.0 |