From 9a3b6b0d75bc550d2ef6365203c07d3f159e5b5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois-Xavier=20de=20Guillebon?= Date: Wed, 17 Mar 2021 12:43:55 +0100 Subject: [PATCH 1/2] Fix isset() on unexisting variable --- src/AbstractUpdateAction.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/AbstractUpdateAction.php b/src/AbstractUpdateAction.php index 1fe7763f32..afc6030a98 100644 --- a/src/AbstractUpdateAction.php +++ b/src/AbstractUpdateAction.php @@ -75,11 +75,11 @@ public function setVersionParams(array $responseData): self $this->setVersion($responseData['_version']); } - if (isset($data['_seq_no'])) { + if (isset($responseData['_seq_no'])) { $this->setSequenceNumber($responseData['_seq_no']); } - if (isset($data['_primary_term'])) { + if (isset($responseData['_primary_term'])) { $this->setPrimaryTerm($responseData['_primary_term']); } From 21d20c1ea04c4c073af22731cc331f3c0eb89a72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois-Xavier=20de=20Guillebon?= Date: Wed, 17 Mar 2021 12:55:45 +0100 Subject: [PATCH 2/2] Add changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 12c0edc742..a550c4e690 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Deprecated ### Removed ### Fixed +* Fixed `_seq_no` and `_primary_term` wrong initialization [#1920](https://github.com/ruflin/Elastica/pull/1920) ### Security ## [7.1.0](https://github.com/ruflin/Elastica/compare/7.0.0...7.1.0)