Skip to content

Commit

Permalink
PHP Warning: Undefined array key "singleRecords" in AddressController…
Browse files Browse the repository at this point in the history
….php line 165 (#447)

Bug Report
Current Behavior
After updating to TYPO3 v11 and PHP 8.1 I get this error about the array key (like many times in PHP ^8.0)

PHP Warning: Undefined array key "singleRecords" in /typo3conf/ext/tt_address/Classes/Controller/AddressController.php line 165
Expected behavior/output
It happens right after creating a list view plugin with a single address inside.
  • Loading branch information
in-session authored Dec 21, 2022
1 parent ffb2501 commit 60360a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Classes/Controller/AddressController.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ protected function createDemandFromSettings(): Demand
if ($this->settings['pages']) {
$demand->setPages($this->getPidList());
}
$demand->setSingleRecords((string)$this->settings['singleRecords']);
$demand->setSingleRecords((string)($this->settings['singleRecords'] ?? ''));
$demand->setSortBy((string)($this->settings['sortBy'] ?? ''));
$demand->setSortOrder((string)($this->settings['sortOrder'] ?? ''));
$demand->setIgnoreWithoutCoordinates((bool)($this->settings['ignoreWithoutCoordinates'] ?? false));
Expand Down

0 comments on commit 60360a8

Please sign in to comment.