add patch for PHP 7.2 from

https://github.com/pear/pear-core/pull/71
This commit is contained in:
Remi Collet 2018-02-13 09:17:18 +01:00
parent cb68554c1e
commit e8e9932bd1
2 changed files with 32 additions and 2 deletions

23
71.patch Normal file
View File

@ -0,0 +1,23 @@
From c5f321f171783c1b088490dcaf39b0aad5eb5c13 Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
Date: Thu, 12 Oct 2017 09:35:57 +0200
Subject: [PATCH] fix Warning: count(): Parameter must be an array or an
object that implements Countable in PEAR/RunTest.php on line 346
---
PEAR/RunTest.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/PEAR/RunTest.php b/PEAR/RunTest.php
index 8eabac3c3..482beccb3 100644
--- a/PEAR/RunTest.php
+++ b/PEAR/RunTest.php
@@ -343,7 +343,7 @@ function run($file, $ini_settings = array(), $test_number = 1)
// Check if test should be skipped.
$res = $this->_runSkipIf($section_text, $temp_skipif, $tested, $ini_settings);
- if (count($res) != 2) {
+ if ($res == 'SKIPPED' || count($res) != 2) {
return $res;
}
$info = $res['info'];

View File

@ -27,7 +27,7 @@
Summary: PHP Extension and Application Repository framework
Name: php-pear
Version: 1.10.5
Release: 5%{?dist}
Release: 6%{?dist}
Epoch: 1
# PEAR, PEAR_Manpages, Archive_Tar, XML_Util, Console_Getopt are BSD
# Structures_Graph is LGPLv3+
@ -48,6 +48,9 @@ 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
# https://github.com/pear/pear-core/pull/71
Patch0: https://patch-diff.githubusercontent.com/raw/pear/pear-core/pull/71.patch
BuildArch: noarch
BuildRequires: php(language) > 5.4
BuildRequires: php-cli
@ -212,7 +215,7 @@ install -m 644 -D macros.pear \
# apply patches on installed PEAR tree
pushd %{buildroot}%{peardir}
: no patch \\o/
patch --no-backup --fuzz 0 -p1 < %{PATCH0}
popd
# Why this file here ?
@ -324,6 +327,10 @@ fi
%changelog
* Tue Feb 13 2018 Remi Collet <remi@remirepo.net> - 1:1.10.5-6
- add patch for PHP 7.2 from
https://github.com/pear/pear-core/pull/71
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.10.5-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild