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 PHP 8.1 deprecation notice #19095

Merged
merged 1 commit into from Apr 18, 2022
Merged

Fix PHP 8.1 deprecation notice #19095

merged 1 commit into from Apr 18, 2022

Conversation

sgiehl
Copy link
Member

@sgiehl sgiehl commented Apr 13, 2022

Description:

Came across this error while testing:

Deprecated: Automatic conversion of false to array is deprecated in /matomo/plugins/Actions/API.php on line 521

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 Apr 13, 2022
@sgiehl sgiehl added this to the 4.10.0 milestone Apr 13, 2022
Deprecated: Automatic conversion of false to array is deprecated in /matomo/plugins/Actions/API.php on line 521
);
}

private function addPageProcessedMetrics(DataTable\DataTableInterface $dataTable)
{
$dataTable->filter(function (DataTable $table) {
$extraProcessedMetrics = $table->getMetadata(DataTable::EXTRA_PROCESSED_METRICS_METADATA_NAME);
$extraProcessedMetrics = $table->getMetadata(DataTable::EXTRA_PROCESSED_METRICS_METADATA_NAME) ?: [];
Copy link
Contributor

Choose a reason for hiding this comment

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

Be good if this PR was two commits so I could easily find the actual changes amongst the formatting improvements.

@justinvelluppillai justinvelluppillai merged commit dc753b2 into 4.x-dev Apr 18, 2022
@justinvelluppillai justinvelluppillai deleted the php81fix branch April 18, 2022 21:57
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
Development

Successfully merging this pull request may close these issues.

None yet

2 participants