• 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 examples

    add_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…

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support angelo_nwl

    (@angelo_nwl)

    thanks, we will going to test this out with this PHP 7.2.1 and inform the devs if needed

    It happens in several places, including:

    Deprecated: Function create_function() is deprecated in /home/wordpress/wp-content/plugins/events-manager/classes/em-mailer.php on line 39

    Causes issues if I have debug on, but if not events still occur.

    • This reply was modified 7 years, 1 month ago by etation.
    Plugin Support angelo_nwl

    (@angelo_nwl)

    hi,

    we already informed the devs know about this.

    I may have a similar issue. EMP doesn’t fully work on PHP v7+. The ability to view Future Events and Search are missing in the admin UI from EMP 5.6 on once the server is running php 7+.

    I’ll plan to try this patch to see if it makes a difference. Thanks.

    • This reply was modified 6 years, 8 months ago by wilrevehl.
    Plugin Support angelo_nwl

    (@angelo_nwl)

    can you try the latest EM version 5.9.5 and confirm?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘php 7.2: create_function() deprecated’ is closed to new replies.