Skip to content

Commit

Permalink
Merge pull request #525 from kaystrobach/patch-2
Browse files Browse the repository at this point in the history
PHP Warning: Undefined array key 0 in /var/www/html/public/typo3conf/…
  • Loading branch information
RinyVT authored Jul 5, 2023
2 parents a54abd6 + eccc038 commit f3887b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Classes/Form/Element/SnippetPreview.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function render(): array
$templateView = $this->getTemplateView();

if ($this->data['tableName'] === 'pages'
&& !in_array((int)$this->data['databaseRow']['doktype'][0], YoastUtility::getAllowedDoktypes(), true)) {
&& !in_array((int)($this->data['databaseRow']['doktype'][0] ?? 0), YoastUtility::getAllowedDoktypes(), true)) {
$templateView->assign('wrongDoktype', true);
$resultArray['html'] = $templateView->render();
return $resultArray;
Expand Down

0 comments on commit f3887b5

Please sign in to comment.