Skip to content

Commit

Permalink
feat: Fix deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
KminekMatej committed Sep 7, 2024
1 parent f462ca8 commit bf8db7b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/components/phpqrcode.php
Original file line number Diff line number Diff line change
Expand Up @@ -3045,14 +3045,14 @@ public function getCode()
{
if ($this->count < $this->dataLength) {
$row = $this->count % $this->blocks;
$col = $this->count / $this->blocks;
$col = intval($this->count / $this->blocks); //intval: avoid deprecation warning
if ($col >= $this->rsblocks[0]->dataLength) {
$row += $this->b1;
}
$ret = $this->rsblocks[$row]->data[$col];
} elseif ($this->count < $this->dataLength + $this->eccLength) {
$row = ($this->count - $this->dataLength) % $this->blocks;
$col = ($this->count - $this->dataLength) / $this->blocks;
$col = intval(($this->count - $this->dataLength) / $this->blocks); //intval: avoid deprecation warning
$ret = $this->rsblocks[$row]->ecc[$col];
} else {
return 0;
Expand Down

0 comments on commit bf8db7b

Please sign in to comment.