From ad9fb4d530d02c4e432f14626c1f08fe827255c5 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Wed, 22 May 2024 20:40:56 +0200 Subject: Module\Help: Only variables can be passed by reference. Introduce an intermediate variable when extracting the file type from the file name. Otherwise we would try to pass a returned value as a reference. --- Zotlabs/Module/Help.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Zotlabs') diff --git a/Zotlabs/Module/Help.php b/Zotlabs/Module/Help.php index 5d52440a5..fd5cacee6 100644 --- a/Zotlabs/Module/Help.php +++ b/Zotlabs/Module/Help.php @@ -210,7 +210,8 @@ class Help extends \Zotlabs\Web\Controller { $content = preg_replace_callback( "/#include (.*?)\;/ism", function ($matches) { - $sub_file_type = array_pop(explode('.', $matches[1])); + $parts = explode('.', $matches[1]); + $sub_file_type = array_pop($parts); $included_content = $this->render_help_file($matches[1], $sub_file_type); return str_replace($matches[0], $included_content, $matches[0]); }, -- cgit v1.2.3