From 84afd9506670ef26219d22401f6d99a31cde49ac Mon Sep 17 00:00:00 2001 From: Tim Siebels Date: Tue, 28 Mar 2023 14:27:35 +0200 Subject: [PATCH] Fixed PHP 8.1 Deprecation: Automatic false to array conversion fixes #54 --- src/Classifier.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Classifier.php b/src/Classifier.php index 36e3443..0295f35 100644 --- a/src/Classifier.php +++ b/src/Classifier.php @@ -202,7 +202,8 @@ public function tryRareCases($ua, &$result) public function parse($ua) { - return $this->fillResult($this->execParse($ua)); + $result = $this->execParse($ua); + return $this->fillResult(false === $result ? [] : $result); } private function fillResult($result)