Support » Plugin: Events Manager » PHP7 error

  • My site throws this error when I move into the admin area of my site from the front end after upgrading to 7.1. Using 5.6.6.1 Thought you would want to see the stack trace:

    [11-Dec-2016 04:07:09 UTC] PHP Fatal error: Uncaught Error: [] operator not supported for strings in /home/xxxxxx/public_html/wp-content/plugins/events-manager/classes/em-events.php:63
    Stack trace:
    #0 /home/xxxxxx/public_html/wp-content/plugins/events-manager/widgets/em-events.php(69): EM_Events::get(Array)
    #1 /home/xxxxxx/public_html/wp-includes/class-wp-widget.php(395): EM_Widget->widget(Array, Array)
    #2 /home/xxxxxx/public_html/wp-includes/widgets.php(738): WP_Widget->display_callback(Array, Array)
    #3 /home/xxxxxx/public_html/wp-content/themes/genesis/lib/functions/widgetize.php(254): dynamic_sidebar(‘home-middle-rig…’)
    #4 /home/xxxxxx/public_html/wp-content/themes/xxxxxx/front-page.php(51): genesis_widget_area(‘home-middle-rig…’, Array)
    #5 /home/xxxxxx/public_html/wp-includes/class-wp-hook.php(298): xxx_home_sections(”)
    #6 /home/xxxxxx/public_html/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(”, Array)
    #7 /home/xxxxxx/public_html/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
    #8 /home/xxxxxx/public_ht in /home/xxxxxx/public_html/wp-content/plugins/events-manager/classes/em-events.php on line 63

Viewing 7 replies - 1 through 7 (of 7 total)
  • this issue is already been reported and the devs are already looking into this.

    If you are not afraid to edit files:

    Open /home/xxxxxx/public_html/wp-content/plugins/events-manager/classes/em-events.php

    Change line 36:
    $groupby_sql = ”;
    to
    $groupby_sql = [];

    And you are good to go. Not sure if there are more problems like this.

    Thanks! Not afraid to edit files. Wasn’t sure if the devs were aware of this one so I thought I’d post it.

    (FWIW – I have so many other plugins with issues, I fear I’m a ways off from PHP7)

    Thank you Peter, editing the file work fine !

    Yes work, thx @petervanderdoes

    I was having the same problem after updating to PHP 7.1, I was getting the same error in my logs and I figured out to change the string definition to an array for the $groupby_sql variable. After that my site was working again.

    Plugin Author Marcus

    (@netweblogic)

    NetWebLogic Support

    Hi everyone, sorry for the delayed replies, a way overdue update is scheduled for next week which fixes all reported PHP 7 errors and warnings. The dev version is a RC, considered stable and already available to try:

    http://wp-events-plugin.com/documentation/upgrade-dev-version/

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.