From 0563f72142ae2fa3d2929e010a1a2e348d0a60ce Mon Sep 17 00:00:00 2001 From: Paul Holden Date: Mon, 19 Dec 2022 16:07:34 +0000 Subject: [PATCH] MDL-76725 mod_wiki: avoid named arguments in real path callback. See also f4fb91ae. PHP8 now supports named arguments in calls to the `call_user_func_array` method, which can result in differing behaviour compared to PHP7, e.g. in this case it was throwing an exception due to an unknown named parameter. --- mod/wiki/parser/markups/wikimarkup.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/wiki/parser/markups/wikimarkup.php b/mod/wiki/parser/markups/wikimarkup.php index 6d5e8333eac..ddeef760504 100644 --- a/mod/wiki/parser/markups/wikimarkup.php +++ b/mod/wiki/parser/markups/wikimarkup.php @@ -332,7 +332,7 @@ abstract class wiki_markup_parser extends generic_parser { protected function real_path($url) { $callbackargs = array_merge(array($url), $this->realpathcallbackargs); - return call_user_func_array($this->realpathcallback, $callbackargs); + return call_user_func_array($this->realpathcallback, array_values($callbackargs)); } /**