Bug #85019

Recycler folder detection loop does not end

Added by Alexander Stehlik about 2 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
File Abstraction Layer (FAL)
Target version:
-
Start date:
2018-05-16
Due date:
% Done:

100%

TYPO3 Version:
8
PHP Version:
7.2
Tags:
Complexity:
easy
Is Regression:
Yes
Sprint Focus:

Description

When a storage does not have a _recycler_ folder the loop for detecting the folder in typo3/sysext/core/Classes/Resource/ResourceStorage.php->getNearestRecyclerFolder() does not end.

The problem seems to be the check for the root folder:

do {

...

while ($recyclerFolder === null && $folder !== $rootFolder);

$folder and $rootFolder point to the same directory but are different object instances. Therefore the strict comparison fails here.

This seems to be a regression introduced in #81836


Related issues

Related to TYPO3 Core - Bug #81836: deleting a file inside _recycler_ folder generates new file with preview_ prefix Closed 2017-07-11

Associated revisions

Revision 12a8eaf2 (diff)
Added by Alexander Stehlik about 2 years ago

[BUGFIX] Prevent endless loop in recycler folder detection

Compare folder identifiers instead of folder objects because
objects pointing to the same folder might still be different
object instances.

Change-Id: I78e21b9e68fbaae245d12ac4efb96312b246a847
Releases: master, 8.7
Resolves: #85019
Reviewed-on: https://review.typo3.org/56985
Tested-by: TYPO3com <>
Reviewed-by: Frans Saris <>
Reviewed-by: Susanne Moog <>
Tested-by: Susanne Moog <>
Reviewed-by: Markus Klein <>
Tested-by: Markus Klein <>

Revision be56e646 (diff)
Added by Alexander Stehlik about 2 years ago

[BUGFIX] Prevent endless loop in recycler folder detection

Compare folder identifiers instead of folder objects because
objects pointing to the same folder might still be different
object instances.

Change-Id: I78e21b9e68fbaae245d12ac4efb96312b246a847
Releases: master, 8.7
Resolves: #85019
Reviewed-on: https://review.typo3.org/57002
Tested-by: TYPO3com <>
Reviewed-by: Markus Klein <>
Tested-by: Markus Klein <>

History

#1 Updated by Alexander Stehlik about 2 years ago

  • Description updated (diff)

#2 Updated by Alexander Stehlik about 2 years ago

  • Related to Bug #81836: deleting a file inside _recycler_ folder generates new file with preview_ prefix added

#3 Updated by Gerrit Code Review about 2 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/56985

#4 Updated by Gerrit Code Review about 2 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/56985

#5 Updated by Gerrit Code Review about 2 years ago

Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/57002

#6 Updated by Alexander Stehlik about 2 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#7 Updated by Benni Mack over 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF