You should update “Gallery Plugin” before the DokuWiki update!
If you didnt, you need to disable the plugin:
edit “plugins.local.php” and insert “$plugins['gallery'] = 0;”
remove the folder “lib/plugins/gallery” and reinstall the plugin later
The error might occur when your PHP version is 5.5 or lower.
You need atleast 5.6 and soon 7