diff options
author | Stefan Giehl <stefan@matomo.org> | 2022-03-17 13:59:33 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-17 13:59:33 +0300 |
commit | 84c2cb1af82dca689480cdcf652afaeb01877d9a (patch) | |
tree | 0c8ec0e6cf6749e3bfa02b0ef95ea22f4bbcc258 /core | |
parent | 6b01674106372cb9e4a420f538d6fdfdb3e52b96 (diff) |
Fix possible error on PHP 8.1 (#18913)
Diffstat (limited to 'core')
-rw-r--r-- | core/CliMulti/Process.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/CliMulti/Process.php b/core/CliMulti/Process.php index 6016f72918..a2e6f86e67 100644 --- a/core/CliMulti/Process.php +++ b/core/CliMulti/Process.php @@ -288,6 +288,11 @@ class Process { $exec = $command . ' > /dev/null 2>&1; echo $?'; $returnCode = @shell_exec($exec); + + if (false === $returnCode || null === $returnCode) { + return false; + } + $returnCode = trim($returnCode); return 0 == (int) $returnCode; } |