diff options
-rw-r--r-- | 5.patch | 36 | ||||
-rw-r--r-- | php-tecnickcom-tc-lib-unicode.spec | 14 |
2 files changed, 46 insertions, 4 deletions
@@ -0,0 +1,36 @@ +From e6cbc5cd2ac0189cbddfe0bf585655ef9dbab2ab Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Fri, 13 Sep 2019 11:50:37 +0200 +Subject: [PATCH] Fix: Trying to access array offset on value of type bool + +--- + src/Bidi.php | 2 +- + test/BidiTest.php | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/Bidi.php b/src/Bidi.php +index 3da33c7..cb49a41 100644 +--- a/src/Bidi.php ++++ b/src/Bidi.php +@@ -176,7 +176,7 @@ protected function setInput($str = null, $chrarr = null, $ordarr = null, $forcer + $this->str = $str; + $this->chrarr = $chrarr; + $this->ordarr = $ordarr; +- $this->forcertl = (($forcertl === false) ? false : strtoupper($forcertl[0])); ++ $this->forcertl = (is_string($forcertl) ? strtoupper($forcertl[0]) : false); + } + + /** +diff --git a/test/BidiTest.php b/test/BidiTest.php +index 6fed41f..5b9cb0c 100644 +--- a/test/BidiTest.php ++++ b/test/BidiTest.php +@@ -86,7 +86,7 @@ public function bidiStrDataProvider() + array( + "\n\nABC\nEFG\n\nHIJ\n\n", + "\n\nABC\nEFG\n\nHIJ\n\n", +- true ++ 'L' + ), + array( + json_decode('"\u202EABC\u202C"'), diff --git a/php-tecnickcom-tc-lib-unicode.spec b/php-tecnickcom-tc-lib-unicode.spec index f4cfe06..cab5bcd 100644 --- a/php-tecnickcom-tc-lib-unicode.spec +++ b/php-tecnickcom-tc-lib-unicode.spec @@ -1,6 +1,6 @@ # remirepo/fedora spec file for php-tecnickcom-tc-lib-unicode # -# Copyright (c) 2016-2018 Remi Collet +# Copyright (c) 2016-2019 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # @@ -16,14 +16,15 @@ Name: php-%{gh_owner}-%{gh_project} Version: 1.3.8 -Release: 1%{?dist} +Release: 2%{?dist} Summary: PHP library containing Unicode methods -Group: Development/Libraries License: LGPLv3+ URL: https://github.com/%{gh_owner}/%{gh_project} Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}-%{?gh_short}.tar.gz +Patch0: https://patch-diff.githubusercontent.com/raw/tecnickcom/tc-lib-unicode/pull/5.patch + BuildArch: noarch %if %{with_tests} # For tests @@ -76,6 +77,7 @@ The initial source code has been derived from TCPDF (http://www.tcpdf.org/). %prep %setup -q -n %{gh_project}-%{gh_commit} +%patch0 -p1 : Sanity check grep -q '^%{version}$' VERSION @@ -102,7 +104,7 @@ require '%{php_project}/Data/autoload.php'; EOF ret=0 -for cmdarg in "php %{phpunit}" "php56 %{_bindir}/phpunit" "php70 %{_bindir}/phpunit6" php71 php72 php73; do +for cmdarg in "php %{phpunit}" "php56 %{_bindir}/phpunit" "php70 %{_bindir}/phpunit6" php71 php72 php73 php74; do if which $cmdarg; then set $cmdarg $1 ${2:-%{_bindir}/phpunit7} --no-coverage --verbose || ret=1 @@ -123,6 +125,10 @@ exit $ret %changelog +* Fri Sep 13 2019 Remi Collet <remi@remirepo.net> - 1.3.8-2 +- add patch for 7.4 from + https://github.com/tecnickcom/tc-lib-unicode/pull/5 + * Mon Jun 25 2018 Remi Collet <remi@remirepo.net> - 1.3.8-1 - update to 1.3.8 (no change) |