From 225907b706a65ddcd116b9a5e673938e7f0bade8 Mon Sep 17 00:00:00 2001 From: Alexander Bigga Date: Tue, 16 Jul 2024 19:11:24 +0200 Subject: [PATCH] Fix PHP error on ical calender import with invalid response (#670) --- functions/icalimport.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/icalimport.php b/functions/icalimport.php index e6ddf1f..1588d43 100644 --- a/functions/icalimport.php +++ b/functions/icalimport.php @@ -238,7 +238,7 @@ function sunflower_import_icals( $force = false ) { } $response = sunflower_icalimport( $url, $auto_categories ); - if ( ! empty( $response ) && is_array( $response ) ) { + if ( ! empty( $response ) && is_array( $response ) && is_array( $response[0] ) ) { $ids_from_remote = array_merge( $ids_from_remote, $response[0] ); } }