Skip to content

Commit

Permalink
Merge pull request #223 from php-twinfield/fix/php81-deprecation-opti…
Browse files Browse the repository at this point in the history
…onal-browse-column-fields

Cast possible null values to string to prevent deprecation warnings
  • Loading branch information
rojtjo authored Jul 17, 2023
2 parents dcde07a + 6fe4da1 commit 9d78de5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Request/BrowseData.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,12 @@ public function addColumn(BrowseColumn $column)
$columnElement = $this->createElement('column');

$columnElement->appendChild($this->createElement('field', $column->getField()));
$columnElement->appendChild($this->createElement('label', $column->getLabel()));
$columnElement->appendChild($this->createElement('label', (string) $column->getLabel()));
$columnElement->appendChild($this->createElement('visible', Util::formatBoolean($column->isVisible())));
$columnElement->appendChild($this->createElement('ask', Util::formatBoolean($column->isAsk())));
$columnElement->appendChild($this->createElement('operator', $column->getOperator()->getValue()));
$columnElement->appendChild($this->createElement('from', $column->getFrom()));
$columnElement->appendChild($this->createElement('to', $column->getTo()));
$columnElement->appendChild($this->createElement('from', (string) $column->getFrom()));
$columnElement->appendChild($this->createElement('to', (string) $column->getTo()));

$this->columnsElement->appendChild($columnElement);
}
Expand Down

0 comments on commit 9d78de5

Please sign in to comment.