diff --git a/core/DataTable.php b/core/DataTable.php index 5049191c27e..f03969f6728 100644 --- a/core/DataTable.php +++ b/core/DataTable.php @@ -751,7 +751,7 @@ public function rebuildIndex() foreach ($this->rows as $id => $row) { $label = $row->getColumn('label'); if ($label !== false) { - $this->rowsIndexByLabel[$label] = $id; + $this->rowsIndexByLabel[(string) $label] = $id; } } @@ -830,7 +830,7 @@ public function addRow(Row $row) ) { $label = $row->getColumn('label'); if ($label !== false) { - $this->rowsIndexByLabel[$label] = count($this->rows) - 1; + $this->rowsIndexByLabel[(string) $label] = count($this->rows) - 1; } } return $row;