After updating to PHP 8.1, I get this error while using the module:

Deprecated function: trim(): Passing null to parameter #1 ($string) of type string is deprecated in Drupal\smart_ip\SmartIp::query() (line 30 of modules/contrib/smart_ip/src/SmartIp.php).

I've provided a patch that fixes this issue.

CommentFileSizeAuthor
#2 smart-ip-php-8.1-bug-3348591-1.patch564 bytesericawright

Comments

ericawright created an issue. See original summary.

ericawright’s picture

StatusFileSize
new564 bytes
peterwcm’s picture

heddn’s picture

Status: Needs review » Reviewed & tested by the community

Nice

heddn’s picture

Status: Reviewed & tested by the community » Closed (duplicate)

Actually, closing this as duplicate to #3304799: Trim with null (deprecated/error) PHP 8.1.