Skip to content

Commit

Permalink
Fix Deprecation Warning for trim() Function in awkExistsAndRunsCorrec…
Browse files Browse the repository at this point in the history
…tly() (#20969)

* Update Process.php

* Update: Use null-coalesce operator for null values

Co-authored-by: Michal Kleiner <mk@011.nz>

---------

Co-authored-by: Michal Kleiner <mk@011.nz>
  • Loading branch information
mindbreaker and michalkleiner committed Jul 7, 2023
1 parent 322aaac commit 7b2fa56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/CliMulti/Process.php
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ private static function psExistsAndRunsCorrectly()
private static function awkExistsAndRunsCorrectly()
{
$testResult = @shell_exec('echo " 537 s000 Ss 0:00.05 login -pfl theuser /bin/bash -c exec -la bash /bin/bash" | ' . self::AWK_COMMAND . ' 2>/dev/null');
return trim($testResult) == '537';
return trim($testResult ?? '') == '537';
}

private static function isSystemNotSupported()
Expand Down

0 comments on commit 7b2fa56

Please sign in to comment.