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

Fatal error "ucfirst(): Argument #1 ($string) must be of type string" in ReportsProvider #18701

Closed
tsteur opened this issue Jan 31, 2022 · 0 comments · Fixed by #18706
Closed
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc. Regression Indicates a feature used to work in a certain way but it no longer does even though it should.
Milestone

Comments

@tsteur
Copy link
Member

tsteur commented Jan 31, 2022

Error: {"message":"ucfirst(): Argument #1 ($string) must be of type string, array given","file":"core/Plugin/ReportsProvider.php","line":37,"request_id":"9ae88","backtrace":" on core/Plugin/ReportsProvider.php(37)\n#0 core/Plugin/ReportsProvider.php(37): ucfirst(Array)\n#1 core/Http/ControllerResolver.php(101): Piwik\Plugin\ReportsProvider::factory('CoreHome', Array)\n#2 core/Http/ControllerResolver.php(59): Piwik\Http\ControllerResolver->createReportController('CoreHome', Array, Array)\n#3 core/FrontController.php(604): Piwik\Http\ControllerResolver->getController('CoreHome', Array, Array)\n#4 core/FrontController.php(168): Piwik\FrontController->doDispatch('CoreHome', Array, Array)\n#5 core/dispatch.php(32): Piwik\FrontController->dispatch()\n#6 index.php(25): require_once('c...')\n#7 {main}",

URL: https://example.yourdomain/index.php?action[%24foobar]=1

Seems in https://github.com/matomo-org/matomo/blob/4.7.0-rc2/core/FrontController.php#L462 we're not defining string. Not sure if we can change false to an empty string for $action. This might break some things. Maybe if $action is not false then we would throw an exception if $action is not a string?

Happens with PHP 8

@tsteur tsteur added Bug For errors / faults / flaws / inconsistencies etc. Regression Indicates a feature used to work in a certain way but it no longer does even though it should. labels Jan 31, 2022
@tsteur tsteur added this to the 4.8.0 milestone Jan 31, 2022
@sgiehl sgiehl self-assigned this Jan 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. Regression Indicates a feature used to work in a certain way but it no longer does even though it should.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants