Skip to content

defensive check on sermons_array#292

Open
tstephen wants to merge 1 commit into
WP-for-Church:devfrom
tstephen:issue-291
Open

defensive check on sermons_array#292
tstephen wants to merge 1 commit into
WP-for-Church:devfrom
tstephen:issue-291

Conversation

@tstephen
Copy link
Copy Markdown
Contributor

@tstephen tstephen commented Sep 5, 2021

Types of changes:

  • [X ] Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • [X ] I have read the CONTRIBUTING document.
  • My code follows the code style of this project. (WPCS)
  • My change requires a change to the documentation.

Brief description of the proposed change:

Fix for issue 291

Any other info:

Doesn't identify the root cause of the empty array.

mattytap pushed a commit to mattytap/Mattytap-Sermons that referenced this pull request May 1, 2026
Guard the import-message cleanup loop against $sermons_array being
non-array (false/null from get_option). Without this, foreach emits a
warning under PHP 7.x and a fatal under PHP 8.x.

Original patch from upstream PR WP-for-Church/Sermon-Manager#292.
Adjusted whitespace and brace placement to match WPCS during ingestion;
behaviour is identical to the upstream patch.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant