Closed csidirop closed 9 months ago
Any questions regarding this PR?
Method loadDocument should be called without any parameters because reading of requestData happen inside it:
protected function loadDocument(int $documentId = 0): void
{
// Get document ID from request data if not passed as parameter.
if ($documentId === 0 && !empty($this->requestData['id'])) {
$documentId = $this->requestData['id'];
}
....
}
PR https://github.com/slub/dfg-viewer/pull/234 contains fix for this problem.
A type error occurred (see below) after an xss vulnerability in presentation got fixed (https://github.com/kitodo/kitodo-presentation/commit/cd528de854b01e393e23288553d0c6a4040f907b).
This commit changes the call to comply with the new parameter requirements (integer instead of typeless -> here an array).
The error message:
Core: Exception handler (WEB): Uncaught TYPO3 Exception: Argument 1 passed to Kitodo\Dlf\Controller\AbstractController::loadDocument() must be of the type int, array given, called in /var/www/typo3/public/typo3conf/ext/dfgviewer/Classes/Controller/UriController.php on line 50 | TypeError thrown in file /var/www/typo3/public/typo3conf/ext/dlf/Classes/Controller/AbstractController.php in line 133.