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

fix: fix cdr gui alert toggles #7179

Merged
merged 2 commits into from
Jan 21, 2024

Conversation

bradymiller
Copy link
Sponsor Member

fixes #7178

@bradymiller
Copy link
Sponsor Member Author

testing well

@@ -498,6 +498,9 @@ function updateSummary($ruleId, $types, $title, $developer, $funding, $release,
{
$rule = $this->getRule($ruleId);

// if $types is empty, then set to empty array so the in_array() calls below will work
$types = !empty($types) ? $types : [];
Copy link
Sponsor Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually, i think i can just use the elvis operator

Copy link
Contributor

@hanksterr7 hanksterr7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirming that with
$types = $types ?: [];
the error I originally observed is resolved.

Thanks for enlightening me about the Elvis operator :)
I originally thought the name came from returning an empty array (related to Elvis has left the building). More correctly, it relates to ?: looking like Elvis when turned sideways

@bradymiller bradymiller merged commit 6c3ffef into openemr:master Jan 21, 2024
24 checks passed
bradymiller added a commit that referenced this pull request Jan 25, 2024
@bradymiller
Copy link
Sponsor Member Author

I just brought this fix into rel-702

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.

bug: CDR gui summary screen submit breaks when set no alert types
2 participants