Skip to content

Commit

Permalink
Fixed text() does not support PHP8
Browse files Browse the repository at this point in the history
  • Loading branch information
limingxinleo committed Jul 10, 2021
1 parent b96163d commit 48691ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/QrReader.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down

1 comment on commit 48691ba

@khanamiryan
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

Please sign in to comment.