From 48691bae2efe316fc4505590275b0e572d72498e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=93=AD=E6=98=95?= <715557344@qq.com> Date: Sat, 10 Jul 2021 12:45:45 +0800 Subject: [PATCH] Fixed text() does not support PHP8 --- lib/QrReader.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/QrReader.php b/lib/QrReader.php index b7dd1ea..f976156 100644 --- a/lib/QrReader.php +++ b/lib/QrReader.php @@ -91,7 +91,7 @@ public function text() { $this->decode(); - if (method_exists($this->result, 'toString')) { + if ($this->result !== false && method_exists($this->result, 'toString')) { return $this->result->toString(); }