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

Ensure series label isn't set to null #20806

Merged
merged 1 commit into from
May 31, 2023
Merged

Ensure series label isn't set to null #20806

merged 1 commit into from
May 31, 2023

Conversation

sgiehl
Copy link
Member

@sgiehl sgiehl commented May 30, 2023

Description:

fixes #20655

Review

@sgiehl sgiehl added not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. Needs Review PRs that need a code review labels May 30, 2023
@sgiehl sgiehl added this to the 5.0.0 milestone May 30, 2023
Comment on lines +241 to +243
if (isset($this->ordinateLabels[$column])) {
$this->pData->setSerieDescription($column, $this->ordinateLabels[$column]);
}
Copy link
Member Author

Choose a reason for hiding this comment

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

I wasn't able to recreate that locally, but this seems to be the only place within Matomo where the series description might get set to null. Not sure in which exact case $this->ordinateLabels[$column] might not be set, but maybe there are some edge cases. Even though this should actually trigger another warning for accessing a not existent array key...

Copy link
Contributor

@michalkleiner michalkleiner left a comment

Choose a reason for hiding this comment

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

Even though we don't have a 100% clarity on how the issue might occur, the change here is a reasonable safeguard.

@sgiehl sgiehl merged commit 0f7cb55 into 5.x-dev May 31, 2023
@sgiehl sgiehl deleted the m20655 branch May 31, 2023 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Projects
None yet
2 participants