Review main Merged

51302[BUGFIX] Initialize TSFE->config with correct type in PHP 7.1

Sascha Egerer CR +2 V +2 Easy +3 −3 updated 01/20/17, 11:50

Commit message

The TypoScriptFrontendController->config variable must be of type
array but is initialized with an empty string. Since PHP 7.1 there is
a different handling of invalid array usage. If a variable is
accessed as an array but is not an array the value of that variable
becomes a string 'A'.

PHP 7
php > $config = '';
php > $config['foo'] = 'bar';
php > print_r($config)
Array
(
    [foo] => bar
)

PHP 7.1
php > $config = '';
php > $config['foo'] = 'bar';
> Warning: Illegal string offset 'foo' in php shell code on line 1
php > print_r($config)
A

Related PHP "Bug" (It's not a bug, it's a feature)
https://bugs.php.net/bug.php?id=73081

Review

  • Code review CR +2
    • Sascha Egerer +2
    • Frans Saris +1
    • Jörg Bösche +1
    • Mathias Brodala +1
  • Verified V +2
    • Sascha Egerer +2
    • Frans Saris +1
    • Mona Muzaffar +1
    • TYPO3com +1 CI

Issues 1

Files 1

Review log 1723

  1. Sascha Egerer uploaded patch set 1 01/13/17, 09:06

  2. Sascha Egerer updated the commit message in patch set 2 01/13/17, 09:09

  3. Sascha Egerer updated the commit message in patch set 3 01/13/17, 09:09

  4. TYPO3com voted on patch set 1 V +1 01/13/17, 09:12 Completed build in 06m 05s on Fri, 13 Jan, 10:12 AM Test Summary: 54939 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6608

  5. TYPO3com voted on patch set 2 V +1 01/13/17, 09:14 Completed build in 05m 42s on Fri, 13 Jan, 10:14 AM Test Summary: 54939 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6609

  6. Sascha Egerer updated the commit message in patch set 4 01/13/17, 09:15

  7. TYPO3com voted on patch set 3 V +1 01/13/17, 09:17 Completed build in 07m 37s on Fri, 13 Jan, 10:17 AM Test Summary: 54939 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6610

  8. TYPO3com voted on patch set 4 V +1 01/13/17, 09:20 Completed build in 04m 16s on Fri, 13 Jan, 10:20 AM Test Summary: 54939 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6612

  9. Helmut Hummel voted on patch set 4 CR +1 01/13/17, 09:25

  10. Mathias Brodala updated the commit message in patch set 5 01/13/17, 09:29

  11. Mathias Brodala commented on patch set 5 01/13/17, 09:30

    This is also a candidate for 7.6 IMO which currently does not restrict itself to PHP 7.0.
  12. Helmut Hummel voted on patch set 5 CR +1 01/13/17, 09:32

  13. TYPO3com voted on patch set 5 V +1 01/13/17, 09:33 Completed build in 04m 38s on Fri, 13 Jan, 10:33 AM Test Summary: 54939 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6613

  14. Georg Ringer commented on patch set 5 01/13/17, 09:53

    but also for 7.6., right?
  15. Sascha Egerer updated the commit message in patch set 6 01/13/17, 10:11

  16. Mathias Brodala voted on patch set 6 CR +1 01/13/17, 10:12

  17. TYPO3com voted on patch set 6 V +1 01/13/17, 10:15 Completed build in 04m 22s on Fri, 13 Jan, 11:15 AM Test Summary: 54939 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6616

  18. Frans Saris commented on patch set 6 CR +1 V +1 01/15/17, 09:19

    Tested only on PHP 7 and there is still works
  19. Mona Muzaffar commented on patch set 6 V +1 01/18/17, 14:54

    tested with PHP 7.1
  20. Jörg Bösche voted on patch set 6 CR +1 01/20/17, 08:42

  21. Sascha Egerer voted on patch set 6 CR +2 V +2 01/20/17, 11:49

  22. Gerrit merged patch set 6 01/20/17, 11:49

  23. Sascha Egerer commented on patch set 7 01/20/17, 11:50

    Cherry Picked This patchset was cherry picked to branch TYPO3_7-6 as commit 17f801f576a7b97b88e44bddb4051b997c1e6868