clockoon / dokuwiki-plugin-commonmark

Commonmark plugin for Dokuwiki
https://www.dokuwiki.org/plugin:commonmark
8 stars 3 forks source link

Empty lang file may cause an error #21

Closed wekev closed 1 year ago

wekev commented 1 year ago

Depending of the current PHP-Version and system an empty lang file may cause an error.

Your lang file only contains a "<?php" without any whitespace or more. In specific installations the js.php request will generate with this a javascript file which contains a "<?phpLANG=" instead of "LANG=".

Could you please remove the empty lang files or extend these to "<?php ?>" or add an comment to these files, which also avoid this bug?

In an old dokumentation of PHP i found this note: In PHP 5.2 and earlier, the parser does not allow the <?php opening tag to be the only thing in a file. This is allowed as of PHP 5.3 provided there are one or more whitespace characters after the opening tag.

Many Thanks!!

clockoon commented 1 year ago

Hello.

According to the forum, it could also be possible to remove unused lang file. This change will be included in the next release.