PHP 8.1 - preg_split fix

Created on 15 December 2023, 11 months ago

Problem/Motivation

PHP 8.1+ doesn't like $limit: NULL.

Deprecated function: preg_split(): Passing null to parameter #3 ($limit) of type int is deprecated in _image_caption_filter_do_img_titles() (line 99 of /WEB_ROOT/sites/all/modules/image_caption/contrib/image_caption_filter.module)

Steps to reproduce

Enable PHP 8.1 for your site.

Proposed resolution

Switch NULL with -1 or 0. See patch.

Just in case you're still using this abandoned module, this will work for PHP 8.1+.

πŸ› Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States aubjr_drupal

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

Comments & Activities

Production build 0.71.5 2024