[bookingactivities_list] apache 500 / php error
-
Hello guys!
First of all, thank you for an awesome plugin!
Please keep up the good work!Secondly, I’m on WordPress 4.9.7 with BA version 1.5.6.
My site locale is d.m.Y, H:i, Norwegian Bokmål.When adding the shortcode [bookingactivities_list] to a static page Apache gives me a 500 error.
I traced the error to function-bookings-system.php. I couldn’t understand all the magic sourcery going on here so I just made it work as easy as I could. But maybe this is something for you guys to look into when you have time?
Starting on line 1570 I made some changes (commented out the original):
foreach( $formatted_events as $event ) { // Format the event duration $event[ 'duration' ] = ''; if( $event[ 'start' ] && $event[ 'end' ] ) { //$event_start = bookacti_format_datetime( $event[ 'start' ], $datetime_format ); //$event_end = bookacti_format_datetime( $event[ 'end' ], $datetime_format ); $event_start = $event[ 'start' ]; $event_end = $event[ 'end' ]; // Format differently if the event start and end on the same day $start_and_end_same_day = substr( $event_start, 0, 10 ) === substr( $event_end, 0, 10 ); if( $start_and_end_same_day ) { $event_end = substr($event_end, 11,18 ); //$event_end = date_i18n( $time_format, strtotime( $event_end ) ); //$event_end = ! mb_check_encoding( $event_end, 'UTF-8' ) ? utf8_encode( $event_end ) : $event_end; } $class = $start_and_end_same_day ? 'bookacti-booking-event-end-same-day' : ''; $separator = $start_and_end_same_day ? $date_time_separator : $dates_separator; // Place an arrow between start and end $event[ 'duration' ] = '<span class="bookacti-booking-event-start" >' . $event_start . '</span>' . '<span class="bookacti-booking-event-date-separator ' . $class . '" >' . $separator . '</span>' . '<span class="bookacti-booking-event-end ' . $class . '" >' . $event_end . '</span>'; }Best regards
Niclas Lindgren
The topic ‘[bookingactivities_list] apache 500 / php error’ is closed to new replies.