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+.

CommentFileSizeAuthor
preg_split-php8.1-compatibility.patch881 bytesaubjr_drupal

Comments

aubjr_drupal created an issue.