Error on discussion with poll
When I add a poll to a discussion, I get this error:
Fatal error: Call to undefined function WrapIf() in /path/to/vanilla/plugins/DiscussionPolls/class.discussionpolls.plugin.php on line 550
vanilla 2.0.18.14, with rounder theme.
0
Comments
Oh dear... looks like I used a 2.1 function.
Please add the following to your
/conf/bootstrap-before.phpfile:function WrapIf($String, $Tag = 'span', $Attributes = '') { if (empty($String)) return ''; else return Wrap($String, $Tag, $Attributes); }If you don't have a
/conf/bootstrap-before.phpfile, create it with the above contents.Please note that new versions of my plugins will not be 2.0.x compatible.
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
Thank you for your help. I had to fiddle around a little bit.
The filename should be is
/conf/bootstrap.before.php, not/conf/bootstrap-before.php.I have no clue about PHP, so first I missed something at the beginning of the file. Now it looks like this (and everything works):
<?php if (!defined('APPLICATION')) exit(); function WrapIf($String, $Tag = 'span', $Attributes = '') { if (empty($String)) return ''; else return Wrap($String, $Tag, $Attributes); }Thank you again!