Review main Abandoned

36518[BUGFIX] Add file_exists check to retrieveFileOrFolderObject

Sebastian Fischer CR 0 V 0 Normal +59 −3 updated 09/04/15, 06:11

Commit message

To ResourceStorage::retrieveFileOoFolderObject only checked if a
given path wasn't a file and else assumed it was a folder.

This patch ads a check before so only when the path exists the
file or folder object is retrieved.

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 2

Review log 18

  1. Sebastian Fischer uploaded patch set 1 01/31/15, 15:22

  2. Ingo Schmitt commented on patch set 1 CR +1 V +1 01/31/15, 15:29

    Cheked by Unittest
  3. Nicole Hummel commented on patch set 1 CR -1 01/31/15, 15:31

    Could you please revoke the commit message!
  4. Frans Saris commented on patch set 1 01/31/15, 21:20

    ResourceFactory.php:425

    @return FileInterface|Folder|NULL
  5. Frans Saris commented on patch set 1 02/01/15, 09:40

    working on this
  6. Frans Saris uploaded patch set 2 02/01/15, 09:46

  7. Frans Saris updated the commit message in patch set 3 02/01/15, 09:48

  8. Frans Saris voted on patch set 3 CR +1 V +1 02/01/15, 09:49

  9. Oliver Klee commented on patch set 3 V +1 CR +1 02/01/15, 10:01

    Tested by running the unit tests.
  10. Thomas Deuling uploaded patch set 4 02/01/15, 10:22

  11. Thomas Deuling commented on patch set 4 V +1 CR +1 02/01/15, 10:23

    Tested by running the unit tests.
  12. Frans Saris commented on patch set 4 CR -1 02/01/15, 10:43

    We need to check this further if the return NULL is ok. For instance on you run into a PHP fatal now instead of a exception when calling the info window for non existing files. http://master.typo3.local/typo3/show_item.php?table=_FILE&uid=uploads%2Fpics%2Ftest.jpg
  13. Roman Schürmann voted on patch set 4 CR +1 02/01/15, 11:38

  14. Frans Saris commented on patch set 4 02/01/15, 12:52

    ResourceFactory.php:425

    A lot places in core depend on the ResourceDoesNotExistException that gets thrown by getFolderObjectFromCombinedIdentifier() for example. We need to check all usages in core for this. Maybe a FileNotFound object could be a solution here.
  15. Benni Mack commented on patch set 4 CR -1 06/29/15, 19:52

    agree here, this patch actually removes some nice logic with exceptions. @sebastian - how to proceed here?
  16. Benni Mack wrote 08/12/15, 20:39

    Topic set to FAL
  17. Benni Mack commented on patch set 4 08/12/15, 20:40

    As a file_exists should only happen in the driver, and nowhere else, I opt for abandoning this issue. Sebastian are you going to pick this topic up? Otherwise I will abandon this issue in the next few days.
  18. Sebastian Fischer abandoned the change 09/04/15, 06:11