PHP 8.1 Deprecated function: preg_split(): Passing null to parameter #3 ($limit) of type int is deprecated in smart_trim_field_formatter_view()

Created on 25 July 2023, over 1 year ago
Updated 22 November 2023, 12 months ago

Problem/Motivation

PHP Error message: Deprecated function: preg_split(): Passing null to parameter #3 ($limit) of type int is deprecated in smart_trim_field_formatter_view() (line 81 of /smart_trim/smart_trim.module).

Proposed resolution

Based on php.net.

If specified, then only substrings up to limit are returned with the rest of the string being placed in the last substring. A limit of -1 or 0 means "no limit".

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇺🇦Ukraine Igumnov_aleksey

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

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

  • PHP 8.2

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

Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024