Skip to content

Commit

Permalink
FIX - BaseValueDescribed::getExampleProcessed() returns NULL if enum …
Browse files Browse the repository at this point in the history
…values contain ZERO int
  • Loading branch information
digitv committed Jan 24, 2022
1 parent 77eb7ce commit 09fdec2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Swagger yaml generator",
"keywords": ["api", "swagger", "open auth"],
"license": "MIT",
"version": "1.1.12",
"version": "1.1.14",
"authors": [
{
"name": "Digit",
Expand Down
2 changes: 1 addition & 1 deletion oa/BaseValueDescribed.php
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ protected function getExampleProcessed()
{
$example = $this->example;
if ($this->hasEnum()) {
$example = in_array($this->example, $this->enum, false) ? $this->example : reset($this->enum);
$example = $this->example !== null && in_array($this->example, $this->enum, false) ? $this->example : reset($this->enum);
}

return $example;
Expand Down

0 comments on commit 09fdec2

Please sign in to comment.