Breaking: #97091 - TSFE->clear_preview has been removed
See forge#97091
Description
The method clear_
of the Typo
has been removed.
Impact
Calling the method will result in a PHP Fatal Error.
Affected Installations
All installations calling the clear_
method
Migration
Build your own clear_
method:
$context = GeneralUtility::makeInstance(Context::class);
$GLOBALS['SIM_EXEC_TIME'] = $GLOBALS['EXEC_TIME'];
$GLOBALS['SIM_ACCESS_TIME'] = $GLOBALS['ACCESS_TIME'];
$context->setAspect(
'frontend.preview',
GeneralUtility::makeInstance(PreviewAspect::class)
);
$context->setAspect(
'date',
GeneralUtility::makeInstance(
DateTimeAspect::class,
(new \DateTimeImmutable())->setTimestamp($GLOBALS['SIM_EXEC_TIME'])
)
);
$context->setAspect(
'visibility',
GeneralUtility::makeInstance(VisibilityAspect::class)
);
Copied!