mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-12-20 21:52:22 +03:00
Fix PHP warning when fixing unavailabilities
This commit is contained in:
parent
3d6e3d8e1c
commit
0a36662272
1 changed files with 2 additions and 3 deletions
|
@ -104,9 +104,8 @@ class Caldav_sync
|
|||
public function save_unavailability(array $unavailability, array $provider): ?string
|
||||
{
|
||||
try {
|
||||
// If the unavailability is reccuring don't sync
|
||||
if (strpos($unavailability['id_caldav_calendar'], 'RECURRENCE') !== false) {
|
||||
return $unavailability['id_caldav_calendar'];
|
||||
if (str_contains((string) $unavailability['id_caldav_calendar'], 'RECURRENCE')) {
|
||||
return $unavailability['id_caldav_calendar'] ?? null; // Do not sync recurring unavailabilities
|
||||
}
|
||||
|
||||
$ics_file = $this->get_unavailability_ics_file($unavailability, $provider);
|
||||
|
|
Loading…
Reference in a new issue