PHP7.4 Deprecated function: Unparenthesized `a ? b : c ? d : e`

Created on 25 January 2022, almost 3 years ago
Updated 31 July 2023, over 1 year ago

Problem/Motivation

Deprecated function: Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in require_once() (line 341 of ../includes/module.inc).

This happens in brilliant_gallery\brilliant_gallery_manage.inc and brilliant_gallery\brilliant_gallery_showtime.inc
'$secur = empty($_SERVER["HTTPS"]) ? '' : ($_SERVER["HTTPS"] == "on") ? "s" : "";'

Steps to reproduce

Use PHP7.4, Token and PathAuto module, and Brilliant Gallery. Try to adjust the url patterns at /admin/config/search/path/patterns, many tokens will be missing when clicking on "Browse availabel tokens". For example all tokens starting with "[node:".

Proposed resolution

Add perenthesis to the lines mentioned in the problem.

Remaining tasks

-

User interface changes

-

API changes

-

Data model changes

-

🐛 Bug report
Status

Active

Version

1.11

Component

Code

Created by

🇳🇱Netherlands GuusK

Live updates comments and jobs are added and updated live.
  • PHP 7.4

    The issue particularly affects sites running on PHP version 7.4.0 or later.

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.

  • Attached is a patch for the issue using 7.x-1.11 sources. Fixes the described error in 2 files (brilliant_gallery_manage.inc & brilliant_gallery_showtime.inc)

Production build 0.71.5 2024