Skip to content

Commit

Permalink
Merge pull request #11 from j4nr6n/is_null
Browse files Browse the repository at this point in the history
Use Strict Comparison on Row and Column Numbers
  • Loading branch information
amattu2 authored Feb 1, 2025
2 parents 24ecab4 + bfc8a82 commit 0479618
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/LabelSheet.php
Original file line number Diff line number Diff line change
Expand Up @@ -246,14 +246,14 @@ public function writeTo($pdf, bool $borders = false): bool

// Get Row Placement
$r = $item->GetRow();
if (!$r || $r > $this->template['rows']) {
if (null === $r || $r > $this->template['rows']) {
$r = $current_row++;
}
$pdf->SetY($this->template['top'] + (($this->template['row_height'] + $this->template['row_gap']) * $r));

// Get Column Placement
$c = $item->GetCol();
if (!$c || $c > $this->template['columns']) {
if (null === $c || $c > $this->template['columns']) {
$c = $current_col;
}
$pdf->SetX($this->template['left'] + (($this->template['column_width'] + $this->template['column_gap']) * $c));
Expand Down

0 comments on commit 0479618

Please sign in to comment.