Merge pull request #21226 from ptibogxiv/patch-21

Fix php8 compatibility
This commit is contained in:
Laurent Destailleur 2022-06-14 16:10:08 +02:00 committed by GitHub
commit 374b67368d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -275,6 +275,13 @@ RESTLER:
with
$loaders = array_unique(static::$rogueLoaders, SORT_REGULAR);
* Replace CommentParser.php line 423
elseif (count($value) && is_numeric($value[0]))
with
elseif (count($value) && isset($value[0]) && is_numeric($value[0]))
+With swagger 2 provided into /explorer:

View File

@ -420,7 +420,7 @@ class CommentParser
$exception = $v1;
array_shift($value);
}
} elseif (count($value) && is_numeric($value[0])) {
} elseif (count($value) && isset($value[0]) && is_numeric($value[0])) {
$code = $value[0];
array_shift($value);
}