Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid PHP error if ics calendar cannot be reached #413

Merged
merged 2 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ jobs:
contents: write
needs: build
steps:
- uses: actions/checkout@v4
- name: fail on fork
if: github.repository_owner != 'verdigado'
run: exit 1
if: github.repository_owner != 'verdigado'
run: exit 1

- uses: actions/checkout@v4
- name: Echo debug
run: |
echo "sunflower-${{ github.ref_name }}.zip"
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ documentation/
build/
assets/vndr/
.favorites.json
.vscode/settings.json
.vscode
pa11y.json
6 changes: 4 additions & 2 deletions functions/icalimport.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,10 @@ function sunflower_import_icals( $force = false ) {
continue;
}

$response = sunflower_icalimport( $url, $auto_categories );
$ids_from_remote = array_merge( $ids_from_remote, $response[0] );
$response = sunflower_icalimport( $url, $auto_categories );
if ( !empty( $response ) ) {
$ids_from_remote = array_merge( $ids_from_remote, $response[0] );
}
}

$deleted_on_remote = array_diff( sunflower_get_events_having_uid(), $ids_from_remote );
Expand Down