summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2021-07-30 13:11:01 +0200
committerRemi Collet <remi@remirepo.net>2021-07-30 13:11:01 +0200
commit2ba24eeaf253f14ac91d3bf11cee998ab18f146c (patch)
treec77647c60d24ae0221640e881f8488aa524c97dd
parentde8aa140105a012ad3756e7a4ded3c154508aed5 (diff)
fix regression in Validator/Barcode/Royalmail using patch from
https://github.com/laminas/laminas-validator/pull/106
-rw-r--r--106.patch23
-rw-r--r--php-laminas-validator.spec10
2 files changed, 32 insertions, 1 deletions
diff --git a/106.patch b/106.patch
new file mode 100644
index 0000000..64601bc
--- /dev/null
+++ b/106.patch
@@ -0,0 +1,23 @@
+From 5b8b5a95c7e7736ff7553caa4745248a86ef59f2 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Fri, 30 Jul 2021 13:04:28 +0200
+Subject: [PATCH] fix Regression in RoyalMail
+
+---
+ src/Barcode/Royalmail.php | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/Barcode/Royalmail.php b/src/Barcode/Royalmail.php
+index 211f9cbc..8d5cd5dc 100644
+--- a/src/Barcode/Royalmail.php
++++ b/src/Barcode/Royalmail.php
+@@ -124,7 +124,8 @@ protected function royalmail($value)
+ $rowchkvalue = array_keys($this->rows, $rowvalue);
+ $colchkvalue = array_keys($this->columns, $colvalue);
+ $intersect = array_intersect($rowchkvalue, $colchkvalue);
+- $chkvalue = current($intersect);
++ $chkvalue = (string)current($intersect);
++
+ if ($chkvalue === $checksum) {
+ return true;
+ }
diff --git a/php-laminas-validator.spec b/php-laminas-validator.spec
index 572894e..de2e49f 100644
--- a/php-laminas-validator.spec
+++ b/php-laminas-validator.spec
@@ -20,7 +20,7 @@
Name: php-%{gh_project}
Version: 2.14.5
-Release: 1%{?dist}
+Release: 3%{?dist}
Summary: %{namespace} Framework %{library} component
License: BSD
@@ -28,6 +28,9 @@ URL: https://github.com/%{gh_owner}/%{gh_project}
Source0: %{gh_commit}/%{name}-%{version}-%{gh_short}.tgz
Source1: makesrc.sh
+# https://github.com/laminas/laminas-validator/pull/106
+Patch0: 106.patch
+
BuildArch: noarch
# Tests
%if %{with_tests}
@@ -176,6 +179,7 @@ Documentation: https://docs.laminas.dev/%{gh_project}/
%prep
%setup -q -n %{gh_project}-%{gh_commit}
+%patch0 -p1
mv LICENSE.md LICENSE
@@ -278,6 +282,10 @@ exit $ret
%changelog
+* Fri Jul 30 2021 Remi Collet <remi@remirepo.net> - 2.14.5-3
+- fix regression in Validator/Barcode/Royalmail using patch from
+ https://github.com/laminas/laminas-validator/pull/106
+
* Mon Jul 19 2021 Remi Collet <remi@remirepo.net> - 2.14.5-1
- update to 2.14.5