php 7.2: create_function() deprecated
-
Hi, i am running a an apache server with php 7.2.1.
On a fresh wordpress install, i can’t activate events-manager plugin because i’ve got an error: create_function() is deprecated.
I watched on php.net, they advice to use anonymous function instead.
I tried to change the .php files from your plugin. For examplesadd_action('widgets_init', create_function('', 'return register_widget("EM_Widget_Calendar");'));
into
add_action('widgets_init', function(){return register_widget("EM_Widget_Calendar");});
each time
create_funtion()
is called.and it seems to work. I don’t really know if it’s the right way to do… but i give you the trick, in case…
- The topic ‘php 7.2: create_function() deprecated’ is closed to new replies.