Skip to content

Commit

Permalink
Merge pull request #49 from soareseneves/master
Browse files Browse the repository at this point in the history
Fix for setasign/fpdf and PHP 8.1+
  • Loading branch information
newerton authored Jul 28, 2023
2 parents 07c06c2 + 29d29b0 commit ce43544
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/Boleto/Render/AbstractPdf.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Newerton\Yii2Boleto\Boleto\Render;

use fpdf\FPDF;
use FPDF;

abstract class AbstractPdf extends FPDF
{
Expand Down Expand Up @@ -80,9 +80,9 @@ public function PageGroupAlias()
return $this->CurrPageGroup;
}

public function _beginpage($orientation, $size)
public function _beginpage($orientation, $size, $rotation)
{
parent::_beginpage($orientation, $size);
parent::_beginpage($orientation, $size, $rotation);
if ($this->NewPageGroup) {
// start a new group
$n = sizeof($this->PageGroups) + 1;
Expand Down
2 changes: 1 addition & 1 deletion src/Boleto/Render/Pdf.php
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ private function listaLinhas($lista, $pulaLinha)
{
foreach ($lista as $d) {
$pulaLinha -= 2;
$this->Cell(0, $this->cell - 0.2, $this->_(preg_replace('/(%)/', '%$1', $d)), 0, 1);
$this->Cell(0, $this->cell - 0.2, $this->_(preg_replace('/(%)/', '%$1', $d ?? '')), 0, 1);
}

return $pulaLinha;
Expand Down

0 comments on commit ce43544

Please sign in to comment.