Review main Merged

36671[BUGFIX] Ensure variable imageSizes is an array before accessing its values

Fabien Udriot CR +2 V +2 Easy +1 −2 updated 02/05/15, 22:46

Commit message

It could be the PHP function "getimagesize" will fail to get the width and
the height of an image if the format is not supported by PHP. The patch
prevent accessing the value of an array which may be not an array.

Review

  • Code review CR +2
    • Christian Kuhn +2
    • Nicole Hummel +1
    • Michael Oehlhof +1
  • Verified V +2
    • Christian Kuhn +2
    • Nicole Hummel +1

Issues 1

Files 1

Review log 12

  1. Fabien Udriot uploaded patch set 1 02/05/15, 14:08

  2. Mathias Schreiber commented on patch set 1 CR +1 V +1 02/05/15, 14:13

    From a technical standpoint this is a no-brainer. But I think the original intention was to make sure that neither height or width were 0, no?
  3. Christian Kuhn commented on patch set 1 02/05/15, 20:02

    technically ok, but i'm also unsure about usages of these methods. what would happen if we throw exceptions instead to handle the issue on a different level, then? Feasible or better not?
  4. Fabien Udriot commented on patch set 1 02/05/15, 20:43

    The class has been just introduced a week ago during the FAL sprint, so no side effect to be feared because of different return type. I would not throw an exception personally.
  5. Christian Kuhn commented on patch set 1 CR +1 02/05/15, 20:46

    fine with me then.
  6. Nicole Hummel commented on patch set 1 CR -1 02/05/15, 22:14

    I would prefer to handle the issue in getImageSizes() instead checking after every use. Take care of that
  7. Nicole Hummel uploaded patch set 2 02/05/15, 22:19

  8. Nicole Hummel voted on patch set 2 CR +1 V +1 02/05/15, 22:20

  9. Michael Oehlhof voted on patch set 2 CR +1 02/05/15, 22:32

  10. Christian Kuhn commented on patch set 2 02/05/15, 22:45

    Cherry Picked This patchset was cherry picked to branch TYPO3_6-2 as commit a2e3624b7965afed2181f39888e4f0a5f39d831e
  11. Christian Kuhn voted on patch set 2 CR +2 V +2 02/05/15, 22:45

  12. Christian Kuhn merged patch set 2 02/05/15, 22:46