From 55afe1939d3398bcf9cfb72414e42945683c96f6 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Sun, 12 Jun 2022 21:33:08 +0200 Subject: [PATCH 1/2] Fix php8 compatibility --- .../restler/framework/Luracast/Restler/CommentParser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/includes/restler/framework/Luracast/Restler/CommentParser.php b/htdocs/includes/restler/framework/Luracast/Restler/CommentParser.php index 6b8b9178f6b..d49211ae80c 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/CommentParser.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/CommentParser.php @@ -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); } From f2bade31887875734637e3bb4460ce67b7dbfae9 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Mon, 13 Jun 2022 19:57:11 +0200 Subject: [PATCH 2/2] Update dolibarr_changes.txt --- dev/dolibarr_changes.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dev/dolibarr_changes.txt b/dev/dolibarr_changes.txt index 204988c5442..cbfecbbc19f 100644 --- a/dev/dolibarr_changes.txt +++ b/dev/dolibarr_changes.txt @@ -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: