1 amoun Jul 09, 2016 16:57
3 amoun Jul 11, 2016 01:36
Ok that seems simple enough, and did clear those error messages but,
I then received
Warning: Missing argument 1 for mytags_plugin::SkinBeginHtmlHead(), called in /home/calstock/public_html/plugins/_mytags.plugin.php on line 118 and defined in /home/calstock/public_html/plugins/_mytags.plugin.php on line 88
Line 88 is function SkinBeginHtmlHead( & $params )
Line 117: function AdminEndHtmlHead( & $params ) {
Line 118: $this->SkinBeginHtmlHead();
Line 119: }
I tried adding the & $params
to the function call at Line 118: but received
Fatal error: Call-time pass-by-reference has been removed in /home/calstock/public_html/plugins/_mytags.plugin.php on line 118
UPDATE 1:
Despite the warning, using the first option, the plugin seems to be working, so how do I get rid of the warning which shows only in the back office?
UPDATE 2: AH! Modified Line 118 to $this->SkinBeginHtmlHead($params);
i.e. without the & and the warning has gone, so Missing argument 1 is $params
All seems good for now. Can someone confirm this is the correct solution not just a fluke:
UPDATE 3:
Oops! Yes it's fluke in that any $variable will do. ???
4 fplanque Jul 12, 2016 01:38
Your "Update 2" seems correct.
5 amoun Jul 12, 2016 06:07
But any variable $name will do when calling the function, is that right?
Oh! and got the Turingtest_plugin back up and working with the & $params
solution
Thanks
6 fplanque Jul 12, 2016 14:58
No, the correct variable to use is $params
even if anything else //appears// to also work.
Yup, your errors are because we made b2evolution compatible with PHP7 and now you need to make your plugins compatible with PHP7 too.
You probably only need to add the
& $params
part to the 3 functions in your plugin that throw an error.Markdown is not mandatory and you are welcome to type in HTML code in the plain/markup editor instead.