turnermm / Updatable-Snippets-for-Dokuwiki

Inserts updatable snippets into Dokuwiki pages
https://dokuwiki.org/plugin:snippets
GNU General Public License v2.0
6 stars 4 forks source link

Error on anonymous function (helper.php:148) #2

Closed MichaelGr closed 9 years ago

MichaelGr commented 9 years ago

Parse error: syntax error, unexpected T_FUNCTION in /home/artatom_ru/data/www/wiki.artatom.ru/lib/plugins/snippets/helper.php on line 148

My wiki hosted on web server with php 5.2.17 that has not closures. I have repaired it now, but maybe someone else will face the same problem in future.

turnermm commented 9 years ago

I am a slight step ahead of the system requirements, but with the next version of dokuwiki there are plans to require php 5.3, which implements the new preg_replace_callback syntax. I'm glad you could fix it. But it's rarely an issue. I've been using it in ckgedit for at least a year, and that has a good size user base, and I've only had a few people needing assistance. So there I've made available pre-5.3 versions of the file where it is a problem.

farmascript commented 9 years ago

The same problem here. What can i change in de sourcecode in helper.php to fix the problem? Thnx.

turnermm commented 9 years ago

I will get back to you with a fix

turnermm commented 9 years ago

Use this branch: https://github.com/turnermm/Updatable-Snippets-for-Dokuwiki/archive/pre_53.zip

farmascript commented 9 years ago

Thanks!