Colorbox 7.x-2.17 causes server error in PHP versions older than 5.5

Created on 5 May 2022, about 2 years ago
Updated 7 June 2023, about 1 year ago

After upgrading to Colorbox 7.x-2.17, we encountered a 500 server error on a site running PHP 5.3. This was tracked down to the line
if (empty(variable_get('colorbox_dompurify_hide_warning', 0))) { on line 71 of colorbox.install , which was introduced as part of the fix for https://www.drupal.org/project/colorbox/issues/3262686 β†’ .

<!--break-->

PHP versions 5.3/5.4/5.5 are still technically supported for Drupal 7 β†’ despite being EOL and unsupported by PHP, and the nature of this error means it is not possible to access any pages of the website (even those that do not use Colorbox).

While it would be best for those affected to upgrade to a newer version of PHP, that is not always an option. In such cases the only solution is to downgrade Colorbox to 7.x-2.16 and go without the fixes, or to edit the install file to assign variable_get('colorbox_dompurify_hide_warning', 0) to a variable before using if (empty()) on the variable.

πŸ› Bug report
Status

Fixed

Version

2.17

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom kewesley

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.

Production build 0.69.0 2024