diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2022-01-04 10:51:08 +0100 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2022-01-25 17:25:15 +0100 |
commit | 540832e15ee8dd6d0fb0d62c8e06a1e0b88c1a44 (patch) | |
tree | b11c0f3218c0e31c7a283355f5e8df3b9174ff56 /build/integration | |
parent | d3a8814d2ecfaacc366e99dbe83e2d926c73ade8 (diff) | |
download | nextcloud-server-540832e15ee8dd6d0fb0d62c8e06a1e0b88c1a44.tar.gz nextcloud-server-540832e15ee8dd6d0fb0d62c8e06a1e0b88c1a44.zip |
Fix PHP Notices in build/integration/features/bootstrap
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'build/integration')
-rw-r--r-- | build/integration/features/bootstrap/CommentsContext.php | 2 | ||||
-rw-r--r-- | build/integration/features/bootstrap/Sharing.php | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/build/integration/features/bootstrap/CommentsContext.php b/build/integration/features/bootstrap/CommentsContext.php index afd9b31bc24..ad2d752b4dd 100644 --- a/build/integration/features/bootstrap/CommentsContext.php +++ b/build/integration/features/bootstrap/CommentsContext.php @@ -175,7 +175,7 @@ class CommentsContext implements \Behat\Behat\Context\Context { if ($res->getStatusCode() === 207) { $service = new Sabre\Xml\Service(); $this->response = $service->parse($res->getBody()->getContents()); - $this->commentId = (int)$this->response[0]['value'][2]['value'][0]['value'][0]['value']; + $this->commentId = (int) ($this->response[0]['value'][2]['value'][0]['value'][0]['value'] ?? 0); } } diff --git a/build/integration/features/bootstrap/Sharing.php b/build/integration/features/bootstrap/Sharing.php index 1e399456054..deff350475b 100644 --- a/build/integration/features/bootstrap/Sharing.php +++ b/build/integration/features/bootstrap/Sharing.php @@ -679,14 +679,14 @@ trait Sharing { * @When save last share id */ public function saveLastShareId() { - $this->savedShareId = $this->lastShareData['data']['id']; + $this->savedShareId = ($this->lastShareData['data']['id'] ?? null); } /** * @Then share ids should match */ public function shareIdsShouldMatch() { - if ($this->savedShareId !== $this->lastShareData['data']['id']) { + if ($this->savedShareId !== ($this->lastShareData['data']['id'] ?? null)) { throw new \Exception('Expected the same link share to be returned'); } } |