Skip to content

Commit

Permalink
[BUGFIX] Fix parameter types
Browse files Browse the repository at this point in the history
  • Loading branch information
Sascha Löffler committed Jul 11, 2024
1 parent f6309c0 commit ec5302b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 3 additions & 0 deletions Classes/Controller/Backend/SettingsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,9 @@ public function saveDefaultPromptAction(): ResponseInterface
// in case argument is an identity array
$promptUid = $promptUid['__identity'];
}
/**
* @var Prompt $defaultPrompt
*/
$defaultPrompt = $this->promptRepository->findByUid($promptUid);

// check if deletePrompt argument is set
Expand Down
10 changes: 4 additions & 6 deletions Classes/Service/ImageMetaDataService.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
use T3G\AgencyPack\FileVariants\Service\ResourcesService;
use TYPO3\CMS\Core\Resource\Exception\InvalidUidException;
use TYPO3\CMS\Core\Resource\Exception\ResourceDoesNotExistException;
use TYPO3\CMS\Core\Resource\File;
use TYPO3\CMS\Core\Resource\FileInterface;
use TYPO3\CMS\Core\Resource\FolderInterface;
use TYPO3\CMS\Core\Resource\ResourceFactory;
use TYPO3\CMS\Core\Site\Entity\SiteLanguage;
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
Expand Down Expand Up @@ -168,15 +170,14 @@ public function saveMetaData(string $target, string $altText = null, int $langua
/**
* Retrieve all language overlays for a file
*
* @param FileInterface|int $fileObject
* @param File $fileObject
* @param int[]|SiteLanguage[] $languages
* @return array
* @throws InvalidUidException
* @throws \Doctrine\DBAL\Exception
*/
public function getMetaDataLanguages(FileInterface|int $fileObject, array $languages): array
public function getMetaDataLanguages(File $fileObject, array $languages): array
{
$translations = [];
$siteLanguages = [];

foreach ($languages as $language) {
Expand All @@ -186,9 +187,6 @@ public function getMetaDataLanguages(FileInterface|int $fileObject, array $langu
$siteLanguages[] = $language;
}
}
if (is_numeric($fileObject)) {
$fileObject = $this->resourceFactory->retrieveFileOrFolderObject($fileObject);
}
$fileMetadata = $fileObject->getMetaData()->get();
$fileMetadataUid = $fileMetadata['uid'];

Expand Down

0 comments on commit ec5302b

Please sign in to comment.