diff --git a/docs/4.x/extend/controllers.md b/docs/4.x/extend/controllers.md
index fb2fa226e..209b4105e 100644
--- a/docs/4.x/extend/controllers.md
+++ b/docs/4.x/extend/controllers.md
@@ -211,14 +211,14 @@ Perform request validation in your controller’s `beforeAction()` method to enf
Craft requires a valid [CSRF token](../dev/controller-actions.md#csrf) for any POST requests. This can be disabled for an entire controller by overriding its `$enableCsrfValidation` property, or just for a specific action:
```php
-public function beforeAction($actionId): bool
+public function beforeAction($action): bool
{
// Don’t require a CSRF token for incoming webhooks:
- if ($actionId === 'receive-webhook') {
+ if ($action->id === 'receive-webhook') {
$this->enableCsrfValidation = false;
}
- return parent::beforeAction($actionId);
+ return parent::beforeAction($action);
}
```
diff --git a/docs/5.x/extend/controllers.md b/docs/5.x/extend/controllers.md
index 333513862..bc39a0c23 100644
--- a/docs/5.x/extend/controllers.md
+++ b/docs/5.x/extend/controllers.md
@@ -211,14 +211,14 @@ Perform request validation in your controller’s `beforeAction()` method to enf
Craft requires a valid [CSRF token](../development/forms.md#csrf) for any POST requests. This can be disabled for an entire controller by overriding its `$enableCsrfValidation` property, or just for a specific action:
```php
-public function beforeAction($actionId): bool
+public function beforeAction($action): bool
{
// Don’t require a CSRF token for incoming webhooks:
- if ($actionId === 'receive-webhook') {
+ if ($action->id === 'receive-webhook') {
$this->enableCsrfValidation = false;
}
- return parent::beforeAction($actionId);
+ return parent::beforeAction($action);
}
```