From 76b96ea8bf19e721e72b4a220af6a5daaebdb598 Mon Sep 17 00:00:00 2001 From: Redouane Date: Wed, 6 Apr 2022 06:46:20 +0100 Subject: [PATCH] fix deprecated Deprecated 8.1 Passing null of type string --- src/BackgroundProcess.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) {