Skip to content

Add null-coalesce safeguard to shell_exec for cases when command fails or returns no output #22102

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

Merged
merged 1 commit into from
Apr 14, 2024

Conversation

michalkleiner
Copy link
Contributor

@michalkleiner michalkleiner commented Apr 11, 2024

Description:

Fixes #22101.

Decided to go with null-coalesce safeguard across all trim(shell_exec(...)) calls as we already had one place exactly like that.

Review

@michalkleiner michalkleiner added c: Platform For Matomo platform changes that aren't impacting any of our APIs but improve the core itself. not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. Needs Review PRs that need a code review labels Apr 11, 2024
@michalkleiner michalkleiner changed the base branch from 5.x-dev to 5.0.x-dev April 11, 2024 10:54
@michalkleiner michalkleiner requested review from a team and sgiehl April 11, 2024 10:54
@michalkleiner
Copy link
Contributor Author

Test failures unrelated.

@michalkleiner michalkleiner merged commit 3923eeb into 5.0.x-dev Apr 14, 2024
@michalkleiner michalkleiner deleted the m22101 branch April 14, 2024 02:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: Platform For Matomo platform changes that aren't impacting any of our APIs but improve the core itself. Needs Review PRs that need a code review not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Development

Successfully merging this pull request may close these issues.

[Bug] Matomo 5.0.2 : /core/Filechecks.php(153): Deprecated - trim(): Passing null to parameter #1 ($string) of type string is deprecated
2 participants