"??" isn't recognized in php 5.5.*

Created on 9 January 2023, almost 2 years ago
Updated 2 March 2023, almost 2 years ago

Problem/Motivation

For very old php engine, there is a part of code in latest release that break the execution of drupal 7.

Steps to reproduce

Update to 7.x-1.2

Proposed resolution

In the taxonomy.module code, in the function _taxonomy_manager_tree_term_set_class(&$class, $current_index, $tree, $expand)

at line 781, comment the line with double questione mark and substitute it with the expanded version:

  //$next = $tree[$next_index] ?? NULL;
  $next = isset($tree[$next_index]) ? $tree[$next_index] : NULL;
🐛 Bug report
Status

Closed: works as designed

Version

2.0

Component

Code

Created by

🇮🇹Italy Alex72RM Rome

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇦🇺Australia VladimirAus Brisbane, Australia

    Happy to support Drupal 7 this year but can't support insecure and outdated version of php.

  • 🇮🇹Italy Alex72RM Rome

    I strongly disagree with the statement in #4.
    with the current operation of updates for drupal 7 if you don't support outdated versions of php the site immediately becomes non-functional; there is no warning about this. In addition, the cost of maintaining compatibility with older versions of php is almost zero if not negligible.
    Unfortunately, in some business realities it is not possible to easily update php so an alternative action is necessary, which, I repeat, has no particular constraints for those who develop modules in drupal.

Production build 0.71.5 2024