Tagged: ,

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #32965

    joostdekeijzer
    Participant

    Hi,

    On PHP71 and above the plugin breaks WordPress with a 500 error. The error log states:

    PHP Fatal error: Uncaught Error: [] operator not supported for strings in /wp-content/plugins/events-maker/includes/class-query.php:551

    In a different plugin the same issue was fixed. See https://dfactory.eu/support/topic/import-wp-post-views-server-error-500/

    I’ve made some changes to class-query to fix, I can send a diff

    #33283

    SergiM
    Participant

    Hi,

    I have the same problem and I can not solve it. Can you publish your solution?

    Thank you!

    #34958

    Sergey
    Participant

    it looks like authors gave up reading this forum. Ok.
    I got the same problem, plugin doesn’t work on PHP 7.1, and I know how to fix it.

    1. Open the file
    \wp-content\plugins\events-maker\includes\class-query.php

    2. From line 516 and below you’ll see a few (8) pieces of code like this:

    $meta_args[] = array(
    'key'		 => $keys['start'],
    'value'		 => date( 'Y-m-d H:i:s', strtotime( $query->query_vars['event_start_after'] . $sa_date ) ),
    'compare'	 => ($query->query_vars['event_date_range'] === 'between' ? '>=' : '<='),
    'type'		 => 'DATETIME'
    );

    3. You shoud add the string
    $meta_args = array();
    before every string
    $meta_args[] = array(

    4. Save the file.
    Now plugin is compatable with php 7.1

    If you wanna read explanation why it didn’t work:
    https://wordpress.org/support/topic/fatal-error-uncaught-error-operator-not-supported-for-strings/

    Enjoy!

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