Skip to content

Commit 267b151

Browse files
committed
Fixed PHP error
# Conflicts: # CHANGELOG.md
1 parent d85ff34 commit 267b151

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
### Changed
1111
- Webhooks now requires Craft 3.7 or later.
1212

13+
### Fixed
14+
- Fixed an error that could occur when calling `craft\webhooks\Plugin::getRequestData()` if an invalid request ID was passed.
15+
1316
## 2.3.3 - 2021-04-01
1417

1518
### Fixed

src/Plugin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ public function getRequestData(int $requestId): array
338338
->one();
339339

340340
if (!$data) {
341-
throw new InvalidArgumentException('Invalid webhook request ID: ' . $this->requestId);
341+
throw new InvalidArgumentException('Invalid webhook request ID: ' . $requestId);
342342
}
343343

344344
if ($data['requestHeaders']) {

0 commit comments

Comments
 (0)