Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix php warning in tsfal #352

Merged
merged 1 commit into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading