Skip to content

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.
Development

Successfully merging this pull request may close these issues.

[PHP 8.1 compatibility] Deprecated - preg_split(): Passing null to parameter #2 ($subject) of type string is deprecated in Draw.php(2302)
2 participants