Skip to content

Commit 7926dc6

Browse files
authored
fix: parameter not found when no value (#6458)
1 parent 93e4b3d commit 7926dc6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Metadata/Parameter.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
namespace ApiPlatform\Metadata;
1515

1616
use ApiPlatform\OpenApi;
17+
use ApiPlatform\State\ParameterNotFound;
1718
use ApiPlatform\State\ParameterProviderInterface;
1819
use Symfony\Component\Validator\Constraint;
1920

@@ -107,7 +108,7 @@ public function getConstraints(): Constraint|array|null
107108
*/
108109
public function getValue(): mixed
109110
{
110-
return $this->extraProperties['_api_values'] ?? null;
111+
return $this->extraProperties['_api_values'] ?? new ParameterNotFound();
111112
}
112113

113114
/**

0 commit comments

Comments
 (0)