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 Google SEO metrics are returned with correct type #18702

Closed
tsteur opened this issue Jan 31, 2022 · 0 comments · Fixed by #18704
Closed

Ensure Google SEO metrics are returned with correct type #18702

tsteur opened this issue Jan 31, 2022 · 0 comments · Fixed by #18704
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Milestone

Comments

@tsteur
Copy link
Member

tsteur commented Jan 31, 2022

Error: {"message":"array_merge(): Argument #2 must be of type array, string given","file":"plugins/SEO/Metric/Aggregator.php","line":35,"request_id":"65a26","backtrace":" on plugins/SEO/Metric/Aggregator.php(35)\n#0 plugins/SEO/Metric/Aggregator.php(35): array_merge(Array, 'Error. Please t...')\n#1 plugins/SEO/Metric/ProviderCache.php(42): Piwik\Plugins\SEO\Metric\Aggregator->getMetrics('www.example...')\n#2 plugins/SEO/API.php(44): Piwik\Plugins\SEO\Metric\ProviderCache->getMetrics('www.example...')\n#3 plugins/SEO/Widgets/GetRank.php(52): Piwik\Plugins\SEO\API->getRank('https://www.example...')\n#4 plugins/CoreHome/Controller.php(94): Piwik\Plugins\SEO\Widgets\GetRank->render()\n#5 [internal function]: Piwik\Plugins\CoreHome\Controller->renderWidget(Object(Piwik\Plugins\SEO\Widgets\GetRank))\n#6 core/FrontController.php(619): call_user_func_array(Array, Array)\n#7 core/FrontController.php(168): Piwik\FrontController->doDispatch('SEO', 'getRank', Array)\n#8 core/dispatch.php(32): Piwik\FrontController->dispatch()\n#9 index.php(25): require_once('c...')\n#10 {main}","safemode_backtrace":"#0 [internal function]: Piwik\Plugins\Cloud\Controller->safemode(Array)\n#1 /core/FrontController.php(619): call_user_func_array(Array, Array)\n#2 /core/FrontController.php(168): Piwik\FrontController->doDispatch('Cloud', 'safemode', Array)\n#3 /core/FrontController.php(99): Piwik\FrontController->dispatch('CorePluginsAdmi...', 'safemode', Array)\n#4 /core/FrontController.php(139): Piwik\FrontController::(Array)\n#5 /core/FrontController.php(189): Piwik\FrontController::(Object(TypeError))\n#6 /core/dispatch.php(32): Piwik\FrontController->dispatch()\n#7 /index.php(25): require_once('/c...')\n#8 {main}"}

URL: https://example.yourdomain/index.php?date=2021-10-02&module=SEO&action=getRank&disableLink=0&widget=1&idSite=1&period=month

Referrer: https://example.yourdomain/index.php?module=CoreHome&action=index&date=2021-10-02&period=month&idSite=1

Happens with PHP 8

Seems in one case an error happened and then we're working with a string?

ggregator.php(35): array_merge(Array, 'Error. Please t...')\n#1

@tsteur tsteur added the Bug For errors / faults / flaws / inconsistencies etc. label Jan 31, 2022
@tsteur tsteur added this to the 4.9.0 milestone Jan 31, 2022
@sgiehl sgiehl self-assigned this Jan 31, 2022
@sgiehl sgiehl modified the milestones: 4.9.0, 4.8.0 Feb 8, 2022
@justinvelluppillai justinvelluppillai added not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. and removed not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. labels Feb 22, 2022
@justinvelluppillai justinvelluppillai changed the title Fatal error "array_merge(): Argument #2 must be of type array, string given" in SEO/Metric/Aggregator.php Ensure Google SEO metrics are returned with correct type Feb 22, 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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants