diff --git a/src/BackgroundProcess.php b/src/BackgroundProcess.php index 599265c..7ae2a43 100755 --- a/src/BackgroundProcess.php +++ b/src/BackgroundProcess.php @@ -116,7 +116,7 @@ public function stop() try { $result = shell_exec(sprintf('kill %d 2>&1', $this->pid)); - if (!preg_match('/No such process/', $result)) { + if (!preg_match('/No such process/', $result ?? '')) { return true; } } catch (Exception $e) {