@bigahuna opened this Issue on December 6th 2021

Expected Behavior

When calling php console diagnostics:run we expect a summary of the system status.

Current Behavior

When calling php console diagnostics:run The following error shows up:

ERROR [2021-12-06 11:14:01] 24912 Uncaught exception: Error: Call to undefined function Piwik\piwik_fix_lbrace() in /var/www/xyz.de/typo3/public/analyse/plugins/Diagnostics/Diagnostic/DiagnosticResult.php:74 Stack trace: <a href='/0'>#0</a> /var/www/xyz.de/typo3/public/analyse/plugins/Diagnostics/Diagnostic/MatomoInformational.php(36): Piwik\Plugins\Diagnostics\Diagnostic\DiagnosticResult::informationalResult('Matomo Version', '4.6.1') <a href='/1'>#1</a> /var/www/xyz.de/typo3/public/analyse/plugins/Diagnostics/DiagnosticService.php(68): Piwik\Plugins\Diagnostics\Diagnostic\MatomoInformational->execute() <a href='/2'>#2</a> /var/www/xyz.de/typo3/public/analyse/plugins/Diagnostics/DiagnosticService.php(55): Piwik\Plugins\Diagnostics\DiagnosticService->run(Array) <a href='/3'>#3</a> /var/www/xyz.de/typo3/public/analyse/plugins/Diagnostics/Commands/Run.php(41): Piwik\Plugins\Diagnostics\DiagnosticService->runDiagnostics() <a href='/4'>#4</a> /var/www/xyz.de/typo3/public/analyse/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Piwik\Plugins\Diagnostics\Commands\Run->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) <a href='/5'>#5</a> /var/www/xyz.de/typo3/public/analyse/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) <a href='/6'>#6</a> /var/www/xyz.de/typo3/public/analyse/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(Piwik\Plugins\Diagnostics\Commands\Run), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) <a href='/7'>#7</a> [internal function]: Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) <a href='/8'>#8</a> /var/www/xyz.de/typo3/public/analyse/core/Console.php(130): call_user_func(Array, Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) <a href='/9'>#9</a> /var/www/xyz.de/typo3/public/analyse/core/Access.php(670): Piwik\Console->Piwik\{closure}() <a href='/10'>#10</a> /var/www/xyz.de/typo3/public/analyse/core/Console.php(131): Piwik\Access::doAsSuperUser(Object(Closure)) <a href='/11'>#11</a> /var/www/xyz.de/typo3/public/analyse/core/Console.php(82): Piwik\Console->doRunImpl(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) <a href='/12'>#12</a> /var/www/xyz.de/typo3/public/analyse/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Piwik\Console->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) <a href='/13'>#13</a> /var/www/xyz.de/typo3/public/analyse/console(32): Symfony\Component\Console\Application->run() <a href='/14'>#14</a> {main} Uncaught exception in /var/www/xyz.de/typo3/public/analyse/plugins/Diagnostics/Diagnostic/DiagnosticResult.php line 74: Call to undefined function Piwik\piwik_fix_lbrace()

The Systemcheck in the browser (/index.php?module=Installation&action=systemCheckPage) runs just fine and reports no errors.

This error did not happen with Matomo 3 or 4.5. It startet after the Update from 4.5.0 to 4.6.1

Steps to Reproduce (for Bugs)

  1. open a terminal
  2. go into matomo directory
  3. run php console diagnostics:run

Alterantively open the admin homepage (/index.php?module=CoreAdminHome&action=home&idSite=1&period=range&date=previous30). Here the "System Check" widget shows the same error as described above (Call to undefined function Piwik\piwik_fix_lbrace());

Your Environment

  • Matomo Version: 4.6.1
  • PHP Version: 7.4.25
  • Server Operating System: CentOS Linux release 7.9.2009 (Core)
  • Browser: Chrome (96.0.4664.55), Safari (15.1 )
  • Operating System: MacOS 11.6.1
@tsteur commented on December 6th 2021 Member

Thanks for this @bigahuna . It can be reproduced eg when GeoIP2 is disabled. Is this the case for you maybe?

@bigahuna commented on December 7th 2021

Thanks for this @bigahuna . It can be reproduced eg when GeoIP2 is disabled. Is this the case for you maybe?

Yes, GeoIP2 is disabled

This Issue was closed on December 7th 2021
Powered by GitHub Issue Mirror