Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorStefan Giehl <stefan@matomo.org>2022-03-17 13:59:33 +0300
committerGitHub <noreply@github.com>2022-03-17 13:59:33 +0300
commit84c2cb1af82dca689480cdcf652afaeb01877d9a (patch)
tree0c8ec0e6cf6749e3bfa02b0ef95ea22f4bbcc258 /core
parent6b01674106372cb9e4a420f538d6fdfdb3e52b96 (diff)
Fix possible error on PHP 8.1 (#18913)
Diffstat (limited to 'core')
-rw-r--r--core/CliMulti/Process.php5
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;
}