IconElement/Fixup

* do not change type of num / qty params ('+1' is not numeric)
This commit is contained in:
Sarjuuk
2025-10-23 00:48:04 +02:00
parent b1f22f7e68
commit 862b3dff73

View File

@@ -148,9 +148,9 @@ class IconElement
$params = [$this->typeId, $this->size];
if ($this->num || $this->qty)
$params[] = is_numeric($this->num) ? $this->num : "'".$this->num."'";
$params[] = is_int($this->num) ? $this->num : "'".$this->num."'";
if ($this->qty)
$params[] = is_numeric($this->qty) ? $this->qty : "'".$this->qty."'";
$params[] = is_int($this->qty) ? $this->qty : "'".$this->qty."'";
return str_repeat(' ', $lpad) . sprintf(self::CREATE_ICON_TPL, $this->element, $this->idx, Type::getJSGlobalString($this->type), implode(', ', $params));
}