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

Issue fork smart_trim-3376831

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Igumnov_aleksey created an issue. See original summary.

Igumnov_aleksey’s picture

StatusFileSize
new744 bytes
markie’s picture

Status: Needs review » Needs work

please create a MR for testing

bharath-kondeti made their first commit to this issue’s fork.

bharath-kondeti’s picture

Status: Needs work » Needs review
jay jangid’s picture

Assigned: Unassigned » jay jangid
jay jangid’s picture

Assigned: jay jangid » Unassigned

I have tested this issue by installing "Smart Trim" module version 7.x-1.x.
Also I have reviewed and implemented the MR! provided by @bharath-kondeti .
The MR! has been implemented successfully.
Result:-
Deprecated function: preg_split() problem solved.
Thank you.

akshay.singh’s picture

Status: Needs review » Reviewed & tested by the community

MR 64 is resolving the issues.

+1 RTBC

Thanks for working

anybody’s picture

Version: 7.x-1.5 » 7.x-1.x-dev
Priority: Normal » Major
Issue tags: +PHP 8.2

Confirming RTBC. @Maintainers could we get this merged please and tag a new release to make this module PHP 8.1 and PHP 8.2 compatible? PHP 8.0 is EOL - for that reason I'm setting the priority to major.

markie’s picture

Status: Reviewed & tested by the community » Fixed

Merged in the MR and created a tag. I don't have a D7 set up to verify so give me a few to set that up and as soon as I confirm I'll create a release

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.