PHP 8.1 Deprecated function: mb_strtolower()

Created on 4 April 2023, about 1 year ago
Updated 14 July 2023, 12 months ago

Problem/Motivation

A fresh install of the Advagg module on Drupal 7 with PHP 8.1 gives an error in the watchdog.

Error message:
Deprecated function: mb_strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in drupal_strtolower() (line 529 of /var/www/html/includes/unicode.inc).

Steps to reproduce

  1. Install Drupal 7 using PHP 8.1
  2. Install the Advagg module
  3. Check watchdog

Proposed resolution

The issue related to the advagg_disable_on_listed_pages Drupal variable that by default is NULL.
We need to use the ADVAGG_DISABLE_ON_LISTED_PAGES constant to have a correct default value.

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡¦Ukraine tibezh

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.

Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024