Bugfix count(null) www/lib

This commit is contained in:
Xenomporio
2022-06-10 17:39:14 +02:00
parent eaa3b1da75
commit b974f1c38e
10 changed files with 173 additions and 173 deletions
+4 -4
View File
@@ -198,7 +198,7 @@ class LabelPrinter
function AddLabel($vartext, $linetext)
{
$varcounter = 0;
$varcounter = count($this->variable);
$varcounter = (!empty($this->variable)?count($this->variable):0);
$varnumber = "V".str_pad($varcounter, 2, "0", STR_PAD_LEFT);
@@ -215,7 +215,7 @@ class LabelPrinter
.'FK"Label1"'."\r\n"
.'FS"Label1"'."\r\n";
for($i=0; $i<count($this->variable); $i++)
for($i=0; $i<(!empty($this->variable)?count($this->variable):0); $i++)
{
$label .= $this->variable[$i]."\r\n";
}
@@ -225,7 +225,7 @@ class LabelPrinter
$label .= 'q'.$this->width."\r\n"
.'Q'.$this->height.','.$this->height_between."\r\n";
for($i=0; $i<count($this->lines); $i++)
for($i=0; $i<(!empty($this->lines)?count($this->lines):0); $i++)
{
$label .= $this->lines[$i]."\r\n";
}
@@ -243,7 +243,7 @@ class LabelPrinter
$inhalt = 'FR"Label1"'."\r\n"
.'?'."\r\n";
for($i=0; $i<count($this->lines); $i++)
for($i=0; $i<(!empty($this->lines)?count($this->lines):0); $i++)
{
$inhalt .= $this->contents[$i]."\r\n";
}