HomeDevCentral

Avoid to compare shell_exec() result as false or null

Description

Avoid to compare shell_exec() result as false or null

Summary:
When comparing the command output with a string,
shell_exec() can returns false or null.

If it returns null, trim will receives NULL value,
and that's behavior is deprecated under PHP 7.4+:

trim(null) would return:

Deprecated: trim(): Passing null to parameter #1 ($string)
of type string is deprecated

Reviewers: dereckson

Reviewed By: dereckson

Differential Revision: https://devcentral.nasqueron.org/D2486

Details

Provenance
derecksonAuthored on Jan 26 2022, 18:41
derecksonPushed on Feb 19 2022, 22:15
Parents
rKERUALD693251166e54: Bump phpunit, phan and phpcs versions
Branches
Unknown
Tags
Unknown

Event Timeline