Support forumCategory: BugsGoogle calender sync doesn't work anymore after moving to php 8.0
mvb asked 3 weeks ago

Hello, our provider updated php to version 8 (from 7.6). Since then, the google sync does not work anymore. It has been working without issues before the move to php 8. Have you seen this issue before and what can be done about this?

8 Answers
Nikola Loncar Staff answered 3 weeks ago

Hi, can you please check error log file on your hosting? Sound like issue with some other plugin that is preventing EA from working. We have locally versions that are running under PHP8

Best regards,
Nikola

mvb answered 2 weeks ago

Dear Nikola, This is what the log shows: AH01215: PHP Fatal error: Uncaught TypeError: implode(): Argument #2 ($array) must be of type ?array, string given in /mnt/web305/c0/04/59701287/htdocs/WordPress_01/wp-content/plugins/easy-appointments-connect/vendor/google/apiclient/src/Google/Http/REST.php:173: /home/strato/http/power/rid/12/04/59701287/htdocs/WordPress_01/wp-cron.php Hope this is of any help to you.  gr Michiel

Nikola Loncar Staff answered 1 week ago

Hi, how many records are there with such error? We are having servers with PHP8 and sync doesn’t generate any errors. 🙁

Best regards,
Nikola

mvb answered 1 week ago

Hi, lots of them; every time the website is calling wp-cron.php, there is this error.  

mvb answered 1 week ago

Hi Nikola, did some debugging myself and changed line 173 of rest.php to:
//$requestUrl .= ‘?’ . implode($queryVars, ‘&’);
$requestUrl .= ‘?’ . implode(‘&’, $queryVars);
Now it seems to work again. 
Documentation I used for this:
https://www.php.net/manual/en/function.implode.php
Best Michiel

Nikola Loncar Staff answered 7 days ago

Hi Michiel, that rest.php is not part of EA?

Best regards,
Nikola

mvb answered 6 days ago

Hi Nikola,
I believe it is, as it is stored in this location: wp-content/plugins/easy-appointments-connect/vendor/google/apiclient/src/Google/Http/REST.php
When there is an update on your easy-appointments-connect plugin, I will keep an eye on this specific rest.php file. For now, everything is back to working so I am happy. 
gr. Michiel

Nikola Loncar Staff answered 6 days ago

Thanks, we will see what can be done there. It is official Google API client.

Best regards,
Nikola