Skip to content

Commit

Permalink
Fix PHP error on ical calender import with invalid response (#670)
Browse files Browse the repository at this point in the history
  • Loading branch information
albig committed Jul 16, 2024
1 parent fb219e5 commit 225907b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion functions/icalimport.php
Original file line number Diff line number Diff line change
Expand Up @@ -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] );
}
}
Expand Down

0 comments on commit 225907b

Please sign in to comment.