diff options
author | Remi Collet <remi@remirepo.net> | 2020-01-02 15:11:20 +0100 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2020-01-02 15:11:20 +0100 |
commit | c2704a79008c485ebc5f6278b74a0edd4f39135d (patch) | |
tree | c8fb323e16c61ea4e2ae570df2281134d568b1fc | |
parent | d56a52b27bab5d7a64e70af15218c47678eb46a2 (diff) |
-rw-r--r-- | 32.patch | 22 | ||||
-rw-r--r-- | php-zendframework-zend-db.spec | 5 |
2 files changed, 27 insertions, 0 deletions
diff --git a/32.patch b/32.patch new file mode 100644 index 0000000..bf30fb4 --- /dev/null +++ b/32.patch @@ -0,0 +1,22 @@ +From 63daebd552279c00a636a531389f9852f0df50c7 Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Thu, 2 Jan 2020 15:06:00 +0100 +Subject: [PATCH] Fix Trying to access array offset on value of type null + +--- + src/TableGateway/Feature/SequenceFeature.php | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/TableGateway/Feature/SequenceFeature.php b/src/TableGateway/Feature/SequenceFeature.php +index ca31bb7f..75bcf9d5 100644 +--- a/src/TableGateway/Feature/SequenceFeature.php ++++ b/src/TableGateway/Feature/SequenceFeature.php +@@ -52,7 +52,7 @@ public function preInsert(Insert $insert) + $values = $insert->getRawState('values'); + $key = array_search($this->primaryKeyField, $columns); + if ($key !== false) { +- $this->sequenceValue = $values[$key]; ++ $this->sequenceValue = ($values ? $values[$key] : NULL); + return $insert; + } + diff --git a/php-zendframework-zend-db.spec b/php-zendframework-zend-db.spec index 3e61010..e73b54e 100644 --- a/php-zendframework-zend-db.spec +++ b/php-zendframework-zend-db.spec @@ -29,6 +29,8 @@ URL: https://zendframework.github.io/%{gh_project}/ Source0: %{gh_commit}/%{name}-%{version}-%{gh_short}.tgz Source1: makesrc.sh +Patch0: https://patch-diff.githubusercontent.com/raw/laminas/laminas-db/pull/32.patch + BuildArch: noarch # Tests %if %{with_tests} @@ -107,6 +109,7 @@ Documentation: https://zendframework.github.io/%{gh_project}/ %prep %setup -q -n %{gh_project}-%{gh_commit} +%patch0 -p1 -b .pr32 mv LICENSE.md LICENSE @@ -169,6 +172,8 @@ exit $ret * Thu Jan 2 2020 Remi Collet <remi@remirepo.net> - 2.11.0-2 - update to 2.11.0 - drop patch merged upstream +- add patch for PHP 7.4 from + https://github.com/laminas/laminas-db/pull/32 * Wed Oct 9 2019 Remi Collet <remi@remirepo.net> - 2.10.0-4 - add patch for PHP 7.4 from |