From 823065a9b23780e5f6cb5343eb6c3e8da872984c Mon Sep 17 00:00:00 2001 From: EAMoiseenko Date: Tue, 22 Feb 2022 19:53:22 +0300 Subject: [PATCH] Added compatibility with 8.1 for trim() --- src/ColumnTrait.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ColumnTrait.php b/src/ColumnTrait.php index 063b4b35..fc394ad7 100644 --- a/src/ColumnTrait.php +++ b/src/ColumnTrait.php @@ -447,7 +447,7 @@ protected function parseFormat() Html::addCssClass($this->pageSummaryOptions, $class); Html::addCssClass($this->footerOptions, $class); } - if (trim($this->width) != '') { + if (null !== $this->width && trim($this->width) != '') { Html::addCssStyle($this->headerOptions, "width:{$this->width};"); Html::addCssStyle($this->pageSummaryOptions, "width:{$this->width};"); Html::addCssStyle($this->footerOptions, "width:{$this->width};"); @@ -516,7 +516,7 @@ protected function fetchContentOptions($model, $key, $index) if ($this->isValidAlignment('vAlign')) { Html::addCssClass($options, "kv-align-{$this->vAlign}"); } - if (trim($this->width) != '') { + if (null !== $this->width && trim($this->width) != '') { Html::addCssStyle($options, "width:{$this->width};"); } $options['data-col-seq'] = array_search($this, $this->grid->columns);