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

filter out the empty venues #50

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tislars
Copy link

@tislars tislars commented Oct 28, 2022

When you have no venue selected in a event, the $venues array still returns 1 element which is null. Applying a array_filter() on $venues removes empty values.

Problem this Pull Request solves

Within the shortcode [ESPRESSO_MY_EVENTS] a venue is shown. However, if no venue is configured for a event, the code will crash because it tries to perform actions on the $venue object. By filtering the empty values in $venues, this problem will not occur.

How has this been tested

Visiting the page where [ESPRESSO_MY_EVENTS] is executed.

Checklist

When you have no venue selected in a event, the `$venues` array still returns 1 element which is `null`. Applying a `array_filter()` on `$venues` removes empty values.
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