Skip to content

Commit ce151bd

Browse files
author
Francois Suter
committed
[TASK] Fix undefined array key usage, PHP 8 compatibility
1 parent 354ba72 commit ce151bd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Classes/Toolbar/ToolbarItem.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ public function manipulateCacheActions(&$cacheActions, &$optionValues)
4242
{
4343
// First check if user has right to access the flush language cache item
4444
$tsConfig = $this->getBackendUser()->getTSConfig();
45-
$option = (bool)$tsConfig['options.']['clearCache.']['flushLanguageCache'];
46-
if ($option || $this->getBackendUser()->isAdmin()) {
45+
$option = $tsConfig['options.']['clearCache.']['flushLanguageCache'] ?? false;
46+
if ((bool)$option || $this->getBackendUser()->isAdmin()) {
4747
/** @var UriBuilder $uriBuilder */
4848
$uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);
4949
try {

0 commit comments

Comments
 (0)