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

[PHP 8.1 compatibility] Deprecated - trim(): Passing null to parameter #1 ($string) of type string #20959

Closed
2 tasks
heurteph-ei opened this issue Jul 3, 2023 · 2 comments · Fixed by #20969
Closed
2 tasks
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Milestone

Comments

@heurteph-ei
Copy link

heurteph-ei commented Jul 3, 2023

From: https://forum.matomo.org/t/probleme-de-recherche-de-mise-a-jour/51570/11

  • /core/CliMulti/Process.php(259): Deprecated - trim(): Passing null to parameter #1 ($string) of type string is deprecated - Matomo 4.14.2 - Piwik\ErrorHandler::errorHandler(),#1/core/CliMulti/Process.php(259),#2/core/CliMulti/Process.php(244),#3/core/CliMulti/Process.php(200),#4/core/CliMulti.php(289),#5/core/CliMulti.php(85),#6/plugins/Diagnostics/Diagnostic/CronArchivingCheck.php(63),#7/plugins/Diagnostics/DiagnosticService.php(68),#8/plugins/Diagnostics/DiagnosticService.php(54),#9/plugins/Installation/Controller.php(525)
  • /core/CliMulti/Process.php(259): Deprecated - trim(): Passing null to parameter #1 ($string) of type string is deprecated - Matomo 4.14.2 - Piwik\ErrorHandler::errorHandler(),#1/core/CliMulti/Process.php(259),#2/core/CliMulti/Process.php(244),#3/plugins/Diagnostics/Diagnostic/CronArchivingCheck.php(68),#4/plugins/Diagnostics/DiagnosticService.php(68),#5/plugins/Diagnostics/DiagnosticService.php(54),#6/plugins/Installation/Controller.php(525),[internal function]: Piwik\Plugins\Installation\Controller->systemCheckPage(),#8/core/FrontController.php(637),#9/core/FrontController.php(169)

I think this is not related to #20658

@heurteph-ei heurteph-ei 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 Jul 3, 2023
@MatomoForumNotifications

This issue has been mentioned on Matomo forums. There might be relevant details there:

https://forum.matomo.org/t/probleme-de-recherche-de-mise-a-jour/51570/14

@sgiehl sgiehl added Bug For errors / faults / flaws / inconsistencies etc. and removed Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. labels Jul 3, 2023
@sgiehl
Copy link
Member

sgiehl commented Jul 3, 2023

Looks like this might fail if a shell_exec can't be executed correctly. A simply check if the variable isn't empty should solve this.

@sgiehl sgiehl added this to the 5.0.0 milestone Jul 3, 2023
@sgiehl sgiehl removed the To Triage An issue awaiting triage by a Matomo core team member label Jul 3, 2023
@sgiehl sgiehl changed the title Deprecated - trim(): Passing null to parameter #1 ($string) of type string [PHP 8.1 compatibility] Deprecated - trim(): Passing null to parameter #1 ($string) of type string Jul 7, 2023
@sgiehl sgiehl assigned sgiehl and unassigned sgiehl Jul 7, 2023
@sgiehl sgiehl modified the milestones: 5.0.0, 4.15.2 Oct 30, 2023
@sgiehl sgiehl reopened this Oct 30, 2023
@sgiehl sgiehl closed this as completed Oct 30, 2023
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