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

Flip logic for determining if $section variable is set. #22027

Merged
merged 1 commit into from
Nov 10, 2021

Conversation

braders
Copy link
Contributor

@braders braders commented Nov 10, 2021

Overview

Previously empty() function calls were added in order to provide PHP8 compatiability,
however, the logic commited was back-to-front.

This broke the ability to display pie and bar charts for those reports which support them.

Before

Attempting to display a bar or pie chart for a report failed, with the following error message in the browser devconsole:

Uncaught ReferenceError: createChart is not defined

After

Pie and bar charts should work again.

Technical Details

This was broken in 0c1caf1.

TBH I'm not sure what the check on $section is doing, or if it's even needed. Maybe someone smarter than me will know? Seemed safest to just leave it be for now though.

Previously empty() function calls were added in order to provide PHP8 compatiability,
however, the logic commited was back-to-front.

This broke the ability to display pie and bar charts for those reports which support them.
@civibot
Copy link

civibot bot commented Nov 10, 2021

(Standard links)

@demeritcowboy
Copy link
Contributor

Thanks that makes sense and I can reproduce.

@eileenmcnaughton eileenmcnaughton merged commit 5b799db into civicrm:master Nov 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants