Issue Bug Closed

#56084t3editor is not usable any more

Alexander Schnitzler 02/18/14, 15:25 updated 10/23/17, 21:40

Description

Regression has been introduced in #55371

The actual problem of the change is the following:

-            $ajaxObj->addContent('result', $this->fileData);
+            $fileData = array();
+            foreach ($this->fileData as $action => $result) {
+                foreach ($result as $files) {
+                    /** @var $file \TYPO3\CMS\Core\Resource\File */
+                    foreach ($files as $file) {
+                        $fileData[$action][] = $file->toArray();
+                    }
+                }
+            }
+            $ajaxObj->addContent('result', $fileData);

Don’t know what that should have fixed as there is not a single unit test for the change but if you save a file edited with t3editor in the list module, $this->fileData is as such:

array(
  'editfile' => array(
    0 => true
  )
)

This results in $files being true instead of array in the second foreach loop. So the third foreach loop will not be executed and therefore $fileData is an empty array.

Reviews 2