• Resolved capucinewordpress

    (@capucinewordpress)


    Hello,
    The plugin keeps generating an error that has oversized my error logs and blocked my server :
    WARNING: [pool tkdvewtvag] child 3638 said into stderr: “NOTICE: PHP message: PHP Warning: DateTime::add() expects parameter 1 to be DateInterval, array given in /home/207867.cloudwaysapps.com/tkdvewtvag/public_html/wp-content/plugins/booking-activities/functions/functions-booking-system.php on line 1690”
    Can you please help me fix this ?
    Thanks,
    Capucine

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author yoancutillas

    (@yoancutillas)

    Hello Capucine,

    Can you tell me
    – What kind of recurring events are you using: monthly, weekly, daily?
    – Are they displayed correctly?
    – What is your PHP version?

    You can use this code to temporarily fix the problem:

    function my_theme_fix_recurring_events_php_error( $repeat_interval, $event, $past_events, $interval, $repeat_from, $repeat_to ) {
         if( is_array( $repeat_interval ) ) { $repeat_interval = new DateInterval( 'P0D' ); }
         return $repeat_interval;
    }
    add_filter( 'bookacti_event_repeat_interval', 'my_theme_fix_recurring_events_php_error', 100, 6 ); 

    You can add this code at the end of this file: wp-content/plugins/booking-activities/functions/functions-booking-system.php
    the problem will be fixed in the next version.

    Regards,
    Yoan Cutillas

    Thread Starter capucinewordpress

    (@capucinewordpress)

    Hello Yoan,

    Thanks for your answer !
    At the moment, I have cloned the website and migrated it to a different server and the issue doesn’t seem to reappear, and I don’t really know which of my settings created it as I was playing around with settings quite a bit.
    If it helps, my events are recurring weekly and I am using PHP 7.2.

    Great if this can be solved in the next update, would be reassured to know the issue won’t reappear.

    Thanks,

    Capucine

    Plugin Author yoancutillas

    (@yoancutillas)

    This warning notice may appear with a certain version of php, or a certain config of your server, or your wp-config.php file.

    But in any case, the next version will fix the problem at the root, thank you for reporting.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Fatal Error generated by the plugin’ is closed to new replies.