Review 9.5 Merged

60881[BUGFIX] Ensure no PHP warning is thrown if legacy code is used

Benni Mack CR +2 V +2 Easy +10 −2 updated 06/05/19, 12:17

Commit message

When no constant is given (due to old OS),
a PHP warning is now triggered due to PHP 7.2. This is
overcome to use the polyfill functionality instead then.

Review

  • Code review CR +2 Done
    • Benni Mack +2
  • Verified V +2 Done
    • Benni Mack +2
    • TYPO3com +1 CI

Issues 1

Files 1

Review log 45

  1. Benni Mack commented on patch set 1 06/05/19, 11:40

    Cherry Picked from branch master.
  2. TYPO3com voted on patch set 1 V +1 06/05/19, 11:55 Completed build in 15m 02s on Wed, 5 Jun, 01:55 PM Test Summary: 50361 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC95-760

  3. Benni Mack voted on patch set 1 V +2 CR +2 06/05/19, 12:09

  4. Benni Mack merged patch set 2 06/05/19, 12:09

  5. Claus Due commented on patch set 2 06/05/19, 12:17

    HttpUtility.php:206 Unresolved

    Since `constant()` returns NULL if a constant is not defined, you can null-coalesce this and avoid declaring a constant that does not belong to TYPO3. If the constant is also used by the polyfill itself (not just the argument) then that should be reported to the proper bug tracker. return \Symfony\Polyfill\Intl\Idn\Idn::idn_to_ascii($domain, IDNA_DEFAULT, constant('INTL_IDNA_VARIANT_UTS46') ?? constant('TYPO3_IDN_TO_ASCII_USE_COMPAT') ?? 1);