Jump to content

Extension talk:QRCodeOnLoad

About this board

{{#QRCodeOnLoad:}} produces error on pages

2
Summary by Kghbln

The documentation was amended to help avoiding the error reported.

Carchaias (talkcontribs)

When using the parser function as suggestet in the doc it rises the error below due to a missing 3rd parameter.

{{#QRCodeOnLoad:}}

Warning: Missing argument 3 for QRCodeOnLoad() in /..../extensions/QRCodeOnLoad/QRCodeOnLoad.php on line 43

Use

{{#QRCodeOnLoad:| }}

instead.

Kghbln (talkcontribs)

Thanks for reporting. I have updated the page accordingly.

Summary by Kghbln

Do not add a trailing ?> to your code.

Kramer~mediawikiwiki (talkcontribs)

I have added a trailing php close tag ?> which is required to run this software. User User:Jack_Phoenix has reverted this edit, (perhaps by mistake?) but I plan to revert back. Please Jack_Phoenix let me know your rational for reverting.

This post was posted by Kramer~mediawikiwiki, but signed as Kramer.

Jack Phoenix (talkcontribs)

No, was not a mistake, but a very intentional change.

The PHP trailing ?> has been considered harmful since 2007 (see r23531 for some more details) and it is not needed in pure PHP files. (Obviously it is needed if you mix, say, HTML and PHP via something like QuickTemplate, for example.) Since 2009, MediaWiki.org has had an AbuseFilter in place to tag edits in which users add that unnecessary closing tag. Perhaps that filter should also display a warning message?

So yes, let's not add the PHP closing tag unless it's really necessary which, by the way, it isn't in most cases. :-)

There are no older topics