Skip to content

Commit 569d808

Browse files
committed
Fix validation check
1 parent 98d710f commit 569d808

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/App.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,11 @@ protected function getArguments(Hook $hook, array $values, array $requestParams)
728728
}
729729
}
730730

731-
if (!$param['skipValidation'] && $paramExists && $value !== null && $value !== '') {
731+
if (
732+
!$param['skipValidation'] &&
733+
!($param['optional'] && $value === null) &&
734+
$paramExists
735+
) {
732736
$this->validate($key, $param, $value);
733737
}
734738

0 commit comments

Comments
 (0)