stephenharris / Event-Organiser

WordPress plug-in, Event Organiser, development repository
http://wordpress.org/extend/plugins/event-organiser/
GNU General Public License v3.0
100 stars 76 forks source link

Calender Feed not working after update to PHP8 #514

Closed Qube2org closed 2 years ago

Qube2org commented 2 years ago

Hey,

Plugin: Event Organiser, Version 3.10.8

after updating the site to PHP8 , we find the calender feed is no longer working. In error log I found:

PHP Fatal error: Uncaught TypeError: join(): Argument #2 ($array) must be of type ?array, string given

There are some changes to functions implode() alias join() in PHP8 (just depricated in PHP7.4 which is working fine).

Complete Log:

09.03.2022 16:11:36 example.com [client 2a00:20:7000::] PHP Fatal error:  Uncaught TypeError: join(): Argument #2 ($array) must be of type ?array, string given in /mnt/htdocs/wordpress/wp-content/plugins/event-organiser/includes/event-organiser-utility-functions.php:1673
09.03.2022 16:11:36 example.com [client 2a00:20:7000::] Stack trace:
09.03.2022 16:11:36 example.com [client 2a00:20:7000::] #0 /mnt/htdocs/wordpress/wp-content/plugins/event-organiser/includes/event-organiser-utility-functions.php(1673): join()
09.03.2022 16:11:36 example.com [client 2a00:20:7000::] #1 /mnt/htdocs/wordpress/wp-content/plugins/event-organiser/templates/ical.php(121): eventorganiser_fold_ical_text()
09.03.2022 16:11:36 example.com [client 2a00:20:7000::] #2 /mnt/htdocs/wordpress/wp-includes/template.php(772): require('...')
09.03.2022 16:11:36 example.com [client 2a00:20:7000::] #3 /mnt/htdocs/wordpress/wp-content/plugins/event-organiser/includes/event-organiser-templates.php(96): load_template()
09.03.2022 16:11:36 example.com [client 2a00:20:7000::] #4 /mnt/htdocs/wordpress/wp-content/plugins/event-organiser/includes/class-event-organiser-im-export.php(143): eo_locate_template()
09.03.2022 16:11:36 example.com [client 2a00:20:7000::] #5 /mnt/htdocs/wordpress/wp-content/plugins/event-organiser/includes/class-event-organiser-im-export.php(123): Event_Organiser_Im_Export->export_events()
09.03.2022 16:11:36 example.com [client 2a00:20:7000::] #6 /mnt/htdocs/wordpress/wp-content/plugins/event-organiser/includes/class-event-organiser-im-export.php(38): Event_Organiser_Im_Export->get_export_file()
09.03.2022 16:11:36 example.com [client 2a00:20:7000::] #7 /mnt/htdocs/wordpress/wp-content/plugins/event-organiser/includes/class-event-organiser-im-export.php(26): Event_Organiser_Im_Export->__construct()
09.03.2022 16:11:36 example.com [client 2a00:20:7000::] #8 /mnt/htdocs/wordpress/wp-includes/class-wp-hook.php(307): Event_Organiser_Im_Export::get_object()
09.03.2022 16:11:36 example.com [client 2a00:20:7000::] #9 /mnt/htdocs/wordpress/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters()
09.03.2022 16:11:36 example.com [client 2a00:20:7000::] #10 /mnt/htdocs/wordpress/wp-includes/plugin.php(474): WP_Hook->do_action()
09.03.2022 16:11:36 example.com [client 2a00:20:7000::] #11 /mnt/htdocs/wordpress/wp-includes/functions.php(1604): do_action()
09.03.2022 16:11:36 example.com [client 2a00:20:7000::] #12 /mnt/htdocs/wordpress/wp-includes/template-loader.php(48): do_feed()
09.03.2022 16:11:36 example.com [client 2a00:20:7000::] #13 /mnt/htdocs/wordpress/wp-blog-header.php(19): require_once('...')
09.03.2022 16:11:36 example.com [client 2a00:20:7000::] #14 /mnt/htdocs/wordpress/index.php(17): require('...')
09.03.2022 16:11:36 example.com [client 2a00:20:7000::] #15 {main}
09.03.2022 16:11:36 example.com [client 2a00:20:7000::] thrown in /mnt/htdocs/wordpress/wp-content/plugins/event-organiser/includes/event-organiser-utility-functions.php on line 1

Please Fix

Qube2org commented 2 years ago

This attached patch is fixing this issue on my side, please check and commit

fix-issue514-join-php8.patch.txt

stephenharris commented 2 years ago

Thanks @Qube2org - this should be fixed in 3.11.0