Skip to content

Commit 536b059

Browse files
committed
[TASK] Assign DataHandler's property copyTree only if the property exists
1 parent c0c7bf9 commit 536b059

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Classes/Core/Functional/Framework/DataHandling/ActionService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ protected function createDataHandler(): DataHandler
559559
{
560560
$this->dataHandler = GeneralUtility::makeInstance(DataHandler::class);
561561
$backendUser = $this->getBackendUser();
562-
if (isset($backendUser->uc['copyLevels'])) {
562+
if (isset($backendUser->uc['copyLevels']) && property_exists($this->dataHandler, 'copyTree')) {
563563
$this->dataHandler->copyTree = $backendUser->uc['copyLevels'];
564564
}
565565
return $this->dataHandler;

Classes/Core/Functional/Framework/DataHandling/Scenario/DataHandlerWriter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ final public function __construct(
3333
public static function withBackendUser(BackendUserAuthentication $backendUser): self
3434
{
3535
$dataHandler = GeneralUtility::makeInstance(DataHandler::class);
36-
if (isset($backendUser->uc['copyLevels'])) {
36+
if (isset($backendUser->uc['copyLevels']) && property_exists($dataHandler, 'copyTree')) {
3737
$dataHandler->copyTree = $backendUser->uc['copyLevels'];
3838
}
3939
return new static($dataHandler, $backendUser);

0 commit comments

Comments
 (0)