relu/contact-form-7-datepicker

create_function deprecated

Opened this issue · 0 comments

If you're using PHP7.x you may get an error of create_function deprecated

Somewhere around line 196 of datetimepicker.php

create_function('$var', 'return ! empty($var);') is the problem.
Change that line to
function($var) {return ! empty($var);}

So that section around line 194 reads:

private function options_encode() { $options = json_encode(array_filter( $this->options, function($var) {return ! empty($var);} )); return stripslashes($options); }