Support » Plugin: The Events Calendar » [Plugin: The Events Calendar] Script execution halted: Call to undefined function filter_var() — 1

Viewing 1 replies (of 1 total)
  • We use the function filter_var for some field validation. It used to be available in an extension but is now default. An explanation here: http://www.php.net/manual/en/filter.installation.php. Maybe updating PHP, enabling the filter extension in php.ini, or installing the extension manually would work.

    Alternatively…
    The only use of filter_var in the plugin occurs in the function addEventMeta in the-events-calendar.class.php. Find the line

    if( is_string($_POST[$htmlElement]) ) $_POST[$htmlElement] = filter_var($_POST[$htmlElement], FILTER_SANITIZE_STRING);

    I have it on line 901 under the comment //update meta fields.

    You could take out the use of filter_var in that line and strip the html tags using strip_tags.

    I didn’t have time to test any of these ideas, but hopefully it helps.

    Justin

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: The Events Calendar] Script execution halted: Call to undefined function filter_var() — 1’ is closed to new replies.