Support forumCategory: BugsIssue with Easy Appointment Connect and PHP 8.1
MedicAppointments asked 6 months ago

Good afternoon,
 
I experienced an issue with Easy Appointment Connect PHP8.1. Indeed the sync between Google Calendar and EA doesn’t work with PHP8.1 but works very well with PHP7.4.
I got no errors from the EAC logs but I wanted to share this issue.
 
Thank you in advance for your answer.

2 Answers
Nikola Loncar Staff answered 6 months ago

Hi, thanks for reporting. We will have to check what is going on there in next couple of days. Do you have maybe error log message from PHP 8.1 in that case?

Best regards,
Nikola

vegardbell replied 5 months ago

I also got sync problems with php 8.1 between google cal and the plugin. If I delete something in the calendar, it will not sync back to the plugin. In PHP 7.4, it works fine.

MedicAppointments replied 1 month ago

Hello,

I come back to this subject because google sync doesn’t work with PHP8.2 but this time I have an error information:

[24-Dec-2022 15:39:31 UTC] PHP Fatal error: Uncaught TypeError: implode(): Argument #2 ($array) must be of type ?array, string given in C:\wamp64\www\…\easy-appointments-connect\vendor\google\apiclient\src\Google\Http\REST.php:173

Basically this issue doesn’t come from your plugin but from the google php “apiclient”.

Thank you in advance for your answer.

MedicAppointments replied 1 month ago

Finally, I found the issue, here the fix:

in the file “C:\wamp64\www\…\wp-content\plugins\easy-appointments-connect\vendor\google\apiclient\src\Google\Http\REST.php”

Change the arguments by passing the separator before the array:
if (count($queryVars)) {
//$requestUrl .= ‘?’ . implode($queryVars, ‘&’);
$requestUrl .= ‘?’ . implode(‘&’, $queryVars);
}

Because:
8.0.0 Passing the separator after the array is no longer supported.
7.4.0 Passing the separator after the array (i.e. using the legacy signature) has been deprecated.

https://www.php.net/manual/en/function.implode.php#refsect1-function.implode-changelog

Merry Christmas 🙂

MedicAppointments replied 1 month ago

Hello,

With PHP 8.2, I found an issue this time with the “easy-appointments\src\fields\tablecolumns.php” file:

PHP Warning: Undefined array key “ea_connect_links” in C:\wamp64\www\…\wp-content\plugins\easy-appointments\src\fields\tablecolumns.php on line 97
[…]
C:\wamp64\www\…\wp-content\plugins\easy-appointments-connect\src\cron\google_cron.php:160
[26-Dec-2022 16:07:11 UTC] PHP 8. EATableColumns->clear_data($table_name = ‘ea_connect_links’, $params = [‘id’ => NULL, ‘app_id’ => 5…5, ‘google_calendar_id’ => ‘3…8@group.calendar.google.com’, ‘google_event_id’ => ‘4…b’, ‘created_at’ => ‘2022-12-26 16:07:11’]) C:\wamp64\www\…\wp-content\plugins\easy-appointments\src\dbmodels.php:266
[26-Dec-2022 16:07:11 UTC] PHP 9. EATableColumns->get_columns($table_name = ‘ea_connect_links’) C:\wamp64\www\…\wp-content\plugins\easy-appointments\src\fields\tablecolumns.php:120

I don’t know if I can help,

Thank you in advance for your answer.

MedicAppointments answered 1 month ago

up