Google calender sync doesn't work anymore after moving to php 8.0
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?
9 Answers
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
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
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
Hi, lots of them; every time the website is calling wp-cron.php, there is this error.
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
$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
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
Thanks, we will see what can be done there. It is official Google API client.
Best regards,
Nikola
Hi,
same problem for me. REST.php isn't compatible with php 8. Need to change :
$requestUrl .= '?' . implode($queryVars, '&');with
$requestUrl .= '?' . implode('&', $queryVars);on line 173 as explain here: https://www.php.net/manual/en/function.implode.php Maybe you can just add a simple search and replace fix in next release (sorry if bad english, not my natural language)
Please login or Register to submit your answer