Review main Abandoned

57342[BUGFIX] Check existence of extension icon before calling ImageInfo

Georg Ringer CR 0 V 0 Easy +5 −3 updated 06/26/18, 12:58

Commit message

Avoid warnings if no extension icon is provided.

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 1

Review log 2026

Show 1 earlier messages
  1. Georg Ringer uploaded patch set 1 06/23/18, 14:26

  1. TYPO3com voted on patch set 1 V +1 06/23/18, 14:34 Completed build in 08m 35s on Sat, 23 Jun, 04:34 PM Test Summary: 32723 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-24773

  2. Susi Moog commented on patch set 1 CR -1 06/23/18, 14:35

    ListUtility.php:274

    shouldn't that be either file_exists or an empty check but one line up (as you access this already to construct the path)?
  3. Frans Saris commented on patch set 1 06/23/18, 16:40

    ListUtility.php:274 Reply

    And any reason to keep the ` $extIconPath = ...` outside of the if statement?
  4. Georg Ringer uploaded patch set 2 06/23/18, 18:10

  5. Georg Ringer commented on patch set 1 06/23/18, 18:10

    file_exist check is already in \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getExtensionIcon()
  6. TYPO3com voted on patch set 2 V -1 06/23/18, 18:19 Completed build in 08m 36s on Sat, 23 Jun, 08:19 PM Test Summary: 32729 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-24785

  7. TYPO3com voted on patch set 2 V +1 06/24/18, 10:31 Completed build in 16h 29m 39s on Sun, 24 Jun, 12:31 PM Test Summary: 32729 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-24785

  8. Frans Saris voted on patch set 2 CR +1 06/24/18, 17:19

  9. Stefan Neufeind updated the commit message in patch set 3 06/24/18, 21:47

  10. Stefan Neufeind commented on patch set 3 CR +1 06/24/18, 21:47

    same code also in 8.7 - added it to the releases-line
  11. TYPO3com voted on patch set 3 V +1 06/24/18, 21:55 Completed build in 08m 06s on Sun, 24 Jun, 11:55 PM Test Summary: 32729 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-24820

  12. Joerg Kummer voted on patch set 3 V +1 CR +1 06/25/18, 05:42

  13. Nicole Hummel commented on patch set 3 CR -1 06/25/18, 10:23

    Looking at it
  14. Nicole Hummel uploaded patch set 4 06/25/18, 10:31

  15. TYPO3com voted on patch set 4 V +1 06/25/18, 10:40 Completed build in 08m 01s on Mon, 25 Jun, 12:40 PM Test Summary: 32729 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-24835

  16. Wouter Wolters commented on patch set 4 CR -1 06/25/18, 10:49

    ListUtility.php:274

    is_file is just fine here.
  17. Nicole Hummel commented on patch set 4 06/25/18, 10:57

    ListUtility.php:274 Reply

    IIRC is_file throws errors for non existing paths? According to the documentation: "Upon failure, an E_WARNING is emitted."
  18. Joerg Kummer commented on patch set 4 06/25/18, 23:47

    Agree with Wouter. Function file_exits() would also emit an E_WARNING. Both functions do so, if open_basedir restriction is in effect.

    ListUtility.php:274 Reply

    Agree with Wouter. Function file_exits() would also emit an E_WARNING. Both functions do so, if open_basedir restriction is in effect.
  19. Nicole Hummel commented on patch set 5 06/26/18, 09:34

    Published edit on patch set 4.
  20. TYPO3com voted on patch set 5 V +1 06/26/18, 09:42 Completed build in 07m 49s on Tue, 26 Jun, 11:42 AM Test Summary: 32729 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-24874

  21. Joerg Kummer voted on patch set 5 V +1 CR +1 06/26/18, 09:47

  22. Tymoteusz Motylewski commented on patch set 5 CR -1 06/26/18, 11:49

    btw, it seems that the $properties['ext_icon_height'] is not used in the core in master any more (in v8 it was used in lang module). So maybe we can deprecate it in master?

    ListUtility.php:277

    in order to be backward compatible the $properties['ext_icon_height'] key should still be created even if initialized with 0 or null (not sure which was the case in situation when file was not there)
  23. Georg Ringer commented on patch set 5 06/26/18, 12:17

    \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getExtensionIcon does already checks if the file itself exist, checking all variants of possible file extensions. so every is_file, file_exists, whatever is not needed again, an check if it is set at all is really enough on that place. if \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getExtensionIcon is wrong, pls just do a different patch. thx
  24. Nicole Hummel commented on patch set 5 06/26/18, 12:38

    @Georg: As this function is public api, I would recommend to not rely on any processing that was done before. IMHO it is not sufficient to rely on the array value here. Thank you!
  25. Georg Ringer abandoned the change 06/26/18, 12:58