[BUGFIX] Check if UC of recycler was ever set 56/55656/2
authorAndreas Fernandez <a.fernandez@scripting-base.de>
Sat, 10 Feb 2018 19:32:32 +0000 (20:32 +0100)
committerStefan Neufeind <typo3.neufeind@speedpartner.de>
Sat, 10 Feb 2018 19:59:50 +0000 (20:59 +0100)
Resolves: #83839
Releases: master
Change-Id: I1e72f959a7ec91c3834fc04ddf175c5c8cb441f2
Reviewed-on: https://review.typo3.org/55656
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Tested-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
typo3/sysext/recycler/Classes/Controller/RecyclerAjaxController.php

index ea5c061..e7237d4 100644 (file)
@@ -161,8 +161,9 @@ class RecyclerAjaxController
     protected function setDataInSession(array $data)
     {
         $beUser = $this->getBackendUser();
-        if (!empty(array_diff_assoc($data, $beUser->uc['tx_recycler']))) {
-            $beUser->uc['tx_recycler'] = array_merge($beUser->uc['tx_recycler'], $data);
+        $recyclerUC = $beUser->uc['tx_recycler'] ?? [];
+        if (!empty(array_diff_assoc($data, $recyclerUC))) {
+            $beUser->uc['tx_recycler'] = array_merge($recyclerUC, $data);
             $beUser->writeUC();
         }
     }