diff options
author | Remi Collet <remi@remirepo.net> | 2019-10-01 15:02:49 +0200 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2019-10-01 15:02:49 +0200 |
commit | 7519a8bac81af0105a46eaa3dddb97b16bed0872 (patch) | |
tree | c8543ccca387c2d70b47140fc79fac77c3707749 | |
parent | 000f1db22d33d3bc8776008c9fa8e5151df40d0e (diff) |
add patch for PHP 7.2 from https://github.com/horde/Util/pull/2
-rw-r--r-- | 2.patch | 22 | ||||
-rw-r--r-- | php-horde-Horde-Util.spec | 17 |
2 files changed, 35 insertions, 4 deletions
@@ -0,0 +1,22 @@ +From 70e66e65fd0739f7176793b013101b0120e19ee8 Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Tue, 1 Oct 2019 14:56:42 +0200 +Subject: [PATCH] Fix Function get_magic_quotes_gpc() is deprecated (7.4) + +--- + lib/Horde/Util.php | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/Horde/Util.php b/lib/Horde/Util.php +index 4d16bb8..d6067a1 100644 +--- a/lib/Horde/Util.php ++++ b/lib/Horde/Util.php +@@ -114,7 +114,7 @@ public static function pformInput($append_session = 0) + public static function dispelMagicQuotes($var) + { + if (is_null(self::$_magicquotes)) { +- self::$_magicquotes = get_magic_quotes_gpc(); ++ self::$_magicquotes = function_exists('get_magic_quotes_gpc') && @get_magic_quotes_gpc(); + } + + if (self::$_magicquotes) { diff --git a/php-horde-Horde-Util.spec b/php-horde-Horde-Util.spec index 385ecee..c4940c7 100644 --- a/php-horde-Horde-Util.spec +++ b/php-horde-Horde-Util.spec @@ -19,15 +19,15 @@ Name: php-horde-Horde-Util Version: 2.5.8 -Release: 8%{?dist} +Release: 11%{?dist} Summary: Horde Utility Libraries -Group: Development/Libraries License: LGPLv2 URL: http://%{pear_channel} Source0: http://%{pear_channel}/get/%{pear_name}-%{version}.tgz Patch0: https://github.com/horde/Util/commit/a8777ae113732dd18f9cf04d825322f596fedac7.patch +Patch1: https://patch-diff.githubusercontent.com/raw/horde/Util/pull/2.patch BuildArch: noarch BuildRequires: php(language) >= 5.3.0 @@ -41,7 +41,11 @@ BuildRequires: glibc-langpack-tr %endif %if %{with_tests} # To run unit tests -BuildRequires: php-pear(%{pear_channel}/Horde_Test) >= 2.1.0 +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +BuildRequires: (php-pear(%{pear_channel}/Horde_Test) >= 2.1.0 with php-pear(%{pear_channel}/Horde_Test) < 3) +%else +BuildRequires: php-pear(%{pear_channel}/Horde_Test) >= 2.1.0 +%endif %endif Requires(post): %{__pear} @@ -78,6 +82,7 @@ These classes provide functionality useful for all kind of applications. cd %{pear_name}-%{version} %patch0 -p1 -b .upstream +%patch1 -p1 -b .pr2 sed -e 's/md5sum="[^"]*"//' ../package.xml >%{name}.xml @@ -105,7 +110,7 @@ export LANG=fr_FR.utf8 cd %{pear_name}-%{version}/test/$(echo %{pear_name} | sed -e s:_:/:g) ret=0 -for cmd in php php56 php70 php71 php72 php73; do +for cmd in php php56 php70 php71 php72 php73 php74; do if which $cmd; then $cmd %{_bindir}/phpunit --verbose . || ret=1 fi @@ -141,6 +146,10 @@ fi %changelog +* Tue Oct 1 2019 Remi Collet <remi@remirepo.net> - 2.5.8-11 +- add patch for PHP 7.2 from + https://github.com/horde/Util/pull/2 + * Fri Jan 4 2019 Remi Collet <remi@remirepo.net> - 2.5.8-8 - cleanup for EL-8 |