From 94fae6b034e1e551ceda7c76b3ae898bdeacf042 Mon Sep 17 00:00:00 2001 From: jcheron Date: Thu, 12 Aug 2021 16:59:57 +0200 Subject: [PATCH] Update HtmlTableContent.php --- .../html/content/table/HtmlTableContent.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Ajax/semantic/html/content/table/HtmlTableContent.php b/Ajax/semantic/html/content/table/HtmlTableContent.php index d74e71e..722709f 100644 --- a/Ajax/semantic/html/content/table/HtmlTableContent.php +++ b/Ajax/semantic/html/content/table/HtmlTableContent.php @@ -14,7 +14,8 @@ * */ class HtmlTableContent extends HtmlSemCollection { - protected $_focusable=false; + + protected $_focusable = false; protected $_tdTagNames = [ "thead" => "th", @@ -70,7 +71,7 @@ protected function createItem($value) { $count = $this->count(); $tr = new HtmlTR(""); $tr->setContainer($this, $count); - if($this->_focusable) { + if ($this->_focusable) { $tr->setProperty('tabindex', $count); } $tr->setTdTagName($this->_tdTagNames[$this->tagName]); @@ -256,8 +257,12 @@ private function colAlign($colIndex, $function) { $count = $this->count(); for ($i = 0; $i < $count; $i ++) { $index = $this->content[$i]->getColPosition($colIndex); - if ($index !== NULL) - $this->getCell($i, $index)->$function(); + if ($index !== NULL) { + $cell = $this->getCell($i, $index); + if ($cell != NULL) { + $cell->$function(); + } + } } return $this; } @@ -487,6 +492,7 @@ public function _setMerged($value) { } /** + * * @param bool $focusable */ public function setFocusable(bool $focusable): void {