diff options
-rw-r--r-- | 2.patch | 47 | ||||
-rw-r--r-- | a8777ae113732dd18f9cf04d825322f596fedac7.patch | 33 | ||||
-rw-r--r-- | php-horde-Horde-Util.spec | 16 |
3 files changed, 7 insertions, 89 deletions
diff --git a/2.patch b/2.patch deleted file mode 100644 index 0f5cfe8..0000000 --- a/2.patch +++ /dev/null @@ -1,47 +0,0 @@ -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 1/2] 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) { - -From 468e497990e238fd40b88d991762c8a2f8a6c29e Mon Sep 17 00:00:00 2001 -From: Remi Collet <remi@remirepo.net> -Date: Thu, 17 Oct 2019 15:18:47 +0200 -Subject: [PATCH 2/2] Fix Invalid characters passed for attempted conversion - -New warning raised in PHP 7.4 -as uniqid generated a hexa string, switch to base 16 ---- - 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 d6067a1..d6d111d 100644 ---- a/lib/Horde/Util.php -+++ b/lib/Horde/Util.php -@@ -304,7 +304,7 @@ public static function createTempDir($delete = true, $temp_dir = null) - /* Get the first 8 characters of a random string to use as a temporary - directory name. */ - do { -- $new_dir = $temp_dir . '/' . substr(base_convert(uniqid(mt_rand()), 10, 36), 0, 8); -+ $new_dir = $temp_dir . '/' . substr(base_convert(uniqid(mt_rand()), 16, 36), 0, 8); - } while (file_exists($new_dir)); - - $old_umask = umask(0000); diff --git a/a8777ae113732dd18f9cf04d825322f596fedac7.patch b/a8777ae113732dd18f9cf04d825322f596fedac7.patch deleted file mode 100644 index 4f2f028..0000000 --- a/a8777ae113732dd18f9cf04d825322f596fedac7.patch +++ /dev/null @@ -1,33 +0,0 @@ -From a8777ae113732dd18f9cf04d825322f596fedac7 Mon Sep 17 00:00:00 2001 -From: Jan Schneider <jan@horde.org> -Date: Mon, 13 Feb 2017 14:57:35 +0100 -Subject: [PATCH] Don't use each(). - -For modern PHP versions there is no improved performance or memory usage compared to foreach() anymore. Beside that it's deprecated in PHP 7.2. ---- - lib/Horde/String.php | 5 ++--- - 1 file changed, 2 insertions(+), 3 deletions(-) - -diff --git a/lib/Horde/String.php b/lib/Horde/String.php -index 26dfcbc..aa8f990 100644 ---- a/lib/Horde/String.php -+++ b/lib/Horde/String.php -@@ -66,8 +66,7 @@ public static function convertCharset($input, $from, $to, $force = false) - - if (is_array($input)) { - $tmp = array(); -- reset($input); -- while (list($key, $val) = each($input)) { -+ foreach ($input as $key => $val) { - $tmp[self::_convertCharset($key, $from, $to)] = self::convertCharset($val, $from, $to, $force); - } - return $tmp; -@@ -84,7 +83,7 @@ public static function convertCharset($input, $from, $to, $force = false) - - $input = clone $input; - $vars = get_object_vars($input); -- while (list($key, $val) = each($vars)) { -+ foreach ($vars as $key => $val) { - $input->$key = self::convertCharset($val, $from, $to, $force); - } - return $input; diff --git a/php-horde-Horde-Util.spec b/php-horde-Horde-Util.spec index 5021abd..108bf2e 100644 --- a/php-horde-Horde-Util.spec +++ b/php-horde-Horde-Util.spec @@ -18,17 +18,14 @@ %endif Name: php-horde-Horde-Util -Version: 2.5.8 -Release: 12%{?dist} +Version: 2.5.9 +Release: 1%{?dist} Summary: Horde Utility 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 BuildRequires: php-pear(PEAR) >= 1.7.0 @@ -81,9 +78,6 @@ These classes provide functionality useful for all kind of applications. %setup -q -c cd %{pear_name}-%{version} -%patch0 -p1 -b .upstream -%patch1 -p1 -b .pr2 - sed -e 's/md5sum="[^"]*"//' ../package.xml >%{name}.xml @@ -112,7 +106,7 @@ cd %{pear_name}-%{version}/test/$(echo %{pear_name} | sed -e s:_:/:g) ret=0 for cmd in php php56 php70 php71 php72 php73 php74; do if which $cmd; then - $cmd %{_bindir}/phpunit --verbose . || ret=1 + $cmd %{_bindir}/phpunit --bootstrap bootstrap.php --verbose . || ret=1 fi done exit $ret @@ -146,6 +140,10 @@ fi %changelog +* Mon Nov 4 2019 Remi Collet <remi@remirepo.net> - 2.5.9-1 +- update to 2.5.9 +- drop patch merged upstream + * Thu Oct 17 2019 Remi Collet <remi@remirepo.net> - 2.5.8-12 - another patch for PHP 7.4 from https://github.com/horde/Util/pull/2 |