diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2024-05-22 20:40:56 +0200 |
---|---|---|
committer | Harald Eilertsen <haraldei@anduin.net> | 2024-06-12 15:13:24 +0200 |
commit | ad9fb4d530d02c4e432f14626c1f08fe827255c5 (patch) | |
tree | d0362f773423ca069a0c99042bba48ce354491bd /Zotlabs | |
parent | ffc2455bea61df2fb0ecf1b39bc596541cb84c40 (diff) | |
download | volse-hubzilla-ad9fb4d530d02c4e432f14626c1f08fe827255c5.tar.gz volse-hubzilla-ad9fb4d530d02c4e432f14626c1f08fe827255c5.tar.bz2 volse-hubzilla-ad9fb4d530d02c4e432f14626c1f08fe827255c5.zip |
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.
Diffstat (limited to 'Zotlabs')
-rw-r--r-- | Zotlabs/Module/Help.php | 3 |
1 files changed, 2 insertions, 1 deletions
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]); }, |