Skip to content

Commit

Permalink
Fix php warning in tsfal
Browse files Browse the repository at this point in the history
  • Loading branch information
digedag committed Oct 11, 2024
1 parent 956a1df commit c877e6a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
Changelog
---------

v1.19.1 (??.10.2024)
* Fix warning in TSFAL
* Possible BC: createConf() in TSFAL is now private

v1.19.0 (06.10.2024)
* Use Doctrine and QueryBuilder for insert, update and delete statements
* new delete()-method for PersistanceRepository
Expand Down
9 changes: 4 additions & 5 deletions Classes/Utility/TSFAL.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
use Sys25\RnBase\Frontend\Marker\Templates;
use tx_rnbase;
use TYPO3\CMS\Core\Resource\FileReference;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;

/***************************************************************
Expand Down Expand Up @@ -287,7 +286,7 @@ protected static function convertRef2Media($pics)
*
* @return ConfigurationInterface
*/
public function createConf($conf)
private function createConf($conf)
{
/** @var Processor $configurations */
$configurations = tx_rnbase::makeInstance(Processor::class);
Expand Down Expand Up @@ -324,13 +323,13 @@ public function fetchFirstReference($content, $configuration)
$contentObject = $this->cObj;

if (isset($configuration['refUid']) || isset($configuration['refUid.'])) {
$uid = intval($contentObject->stdWrap($configuration['refUid'] ?? '', $configuration['refUid.'] ?? []));
$uid = (int) $contentObject->stdWrap($configuration['refUid'] ?? '', $configuration['refUid.'] ?? []);
} else {
$uid = $contentObject->data['_LOCALIZED_UID'] ?? $contentObject->data['uid'];
}
$refTable = ($configuration['refTable'] && is_array($GLOBALS['TCA'][$configuration['refTable']])) ?
$configuration['refTable'] : 'tt_content';
$refField = trim($contentObject->stdWrap($configuration['refField'], $configuration['refField.']));
$refField = trim($contentObject->stdWrap($configuration['refField'], $configuration['refField.'] ?? []));

if (isset($GLOBALS['BE_USER']->workspace) && 0 !== $GLOBALS['BE_USER']->workspace) {
$workspaceRecord = BackendUtility::getWorkspaceVersionOfRecord(
Expand Down Expand Up @@ -761,7 +760,7 @@ public static function getFirstReferenceFileInfo($refTable, $refUid, $refField)
*/
private static function getResourceFactory()
{
return GeneralUtility::makeInstance(\TYPO3\CMS\Core\Resource\ResourceFactory::class);
return tx_rnbase::makeInstance(\TYPO3\CMS\Core\Resource\ResourceFactory::class);
}

/**
Expand Down

0 comments on commit c877e6a

Please sign in to comment.