Skip to content

Commit

Permalink
Only check for POST method if there is not input callback
Browse files Browse the repository at this point in the history
  • Loading branch information
aschempp committed Sep 3, 2024
1 parent c0ac3f2 commit 41eedc3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Form/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,7 @@ public function fetch(string $fieldName): mixed
throw new \BadMethodCallException('The has been not submitted');
}

if ('POST' !== $this->getHttpMethod()) {
if (!$this->inputCallback && 'POST' !== $this->getHttpMethod()) {
throw new \BadMethodCallException('Widgets only support fetching POST values. Use the \Contao\Input class for other purposes.');
}

Expand Down

0 comments on commit 41eedc3

Please sign in to comment.