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

Warning: Undefined array key "method" in PrivacyManager.php #20651

Closed
tsteur opened this issue May 2, 2023 · 2 comments · Fixed by #20653
Closed

Warning: Undefined array key "method" in PrivacyManager.php #20651

tsteur opened this issue May 2, 2023 · 2 comments · Fixed by #20653
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
Milestone

Comments

@tsteur
Copy link
Member

tsteur commented May 2, 2023

Below warning happened 26 times in the last 3 hours alone:

/var/www/html/plugins/PrivacyManager/PrivacyManager.php(202): Warning - Undefined array key "method" - Matomo 4.14.3-b1 - Please report this message in the Matomo forums: https://forum.matomo.org (please do a search first as it might have been reported already) #0/plugins/PrivacyManager/PrivacyManager.php(202),[internal function]: Piwik\Plugins\PrivacyManager\PrivacyManager->shouldDisablePostProcessing(),#2/core/EventDispatcher.php(147),#3/core/Piwik.php(871),#4/core/API/Request.php(696),#5/core/API/Request.php(227),#6/plugins/API/Controller.php(45),[internal function]: Piwik\Plugins\API\Controller->index(),#8/core/FrontController.php(637),#9/core/FrontController.php(169)

I don't have more information on this.

@tsteur tsteur added Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. To Triage An issue awaiting triage by a Matomo core team member labels May 2, 2023
@michalkleiner michalkleiner self-assigned this May 2, 2023
@michalkleiner michalkleiner removed Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. To Triage An issue awaiting triage by a Matomo core team member labels May 2, 2023
@michalkleiner
Copy link
Contributor

Hi @tsteur,

thank you for reporting this. Looking at the code, I can see how the warning can happen, though I think it's mostly through an incorrect or malformed (intentionally or by accident) request since it relates to the PrivacyManager.

I will shortly push a small PR making sure the warnings are not issued for incorrect requests.

@michalkleiner michalkleiner added the Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. label May 2, 2023
@michalkleiner
Copy link
Contributor

PR open at #20653

@michalkleiner michalkleiner removed their assignment May 2, 2023
@sgiehl sgiehl linked a pull request May 3, 2023 that will close this issue
11 tasks
@sgiehl sgiehl added this to the 5.0.0 milestone May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants