Closed mbsued closed 1 year ago
Same error here.
Thanks for the ticket.
I might be able to look into this tomorrow or starting next week. Any PR would speed up a fix.
I confirm this issue with TYPO3 11.5.30, PHP 7.4 FPM and fal_securedownload 5.0.0
It is caused by string type hint for $combinedIdentifier argument in BeechIt\FalSecuredownload\Hooks\AbstractBeButtons::generateButtons() added with 5.0.0 version.
A quick fix could be in Hooks/DocHeaderButtonsHook::getButtons()
:
public function getButtons(array $params, ButtonBar $buttonBar): array
{
$buttons = $params['buttons'];
if(is_null(GeneralUtility::_GP('id'))) return $buttons; // HERE THE QUICK FIX
foreach ($this->generateButtons(GeneralUtility::_GP('id')) as $buttonInfo) {
$button = $buttonBar->makeLinkButton();
$button->setIcon($buttonInfo['icon']);
$button->setTitle($buttonInfo['title']);
$button->setHref($buttonInfo['url']);
$buttons[ButtonBar::BUTTON_POSITION_LEFT][1][] = $button;
}
return $buttons;
}
With Typo3 Version 11.5.31, php 8.1-latest FPM (8.1.18) (P+) and fal_securdownload 5.0.0 Typo3 throws the following error:
Core: Exception handler (WEB): Uncaught TYPO3 Exception: BeechIt\FalSecuredownload\Hooks\AbstractBeButtons::generateButtons(): Argument #1 ($combinedIdentifier) must be of type string, null given, called in /html/typo3/typo3conf/ext/fal_securedownload/Classes/Hooks/DocHeaderButtonsHook.php on line 65 | TypeError thrown in file /html/typo3/typo3conf/ext/fal_securedownload/Classes/Hooks/AbstractBeButtons.php in line 61.