PHP 8.1 Support strlen(): Passing null to parameter #1

Created on 10 August 2023, over 1 year ago

Problem/Motivation

Issue Loading Icons with PHP 8.1
Error Log Report:

Deprecated function: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in _fontawesome_unparse_url() (line 294 of /modules/fontawesome/fontawesome.module).

Steps to reproduce

PHP Version 8.1
Open page with FontAwesome Icons
Review Error Log

Proposed resolution

Update Code to pass empty string vs Null

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Needs review

Version

3.13

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States whthat

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @whthat
  • Status changed to Needs review over 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States whthat
  • πŸ‡ΊπŸ‡ΈUnited States philsward

    Patch #2 applied cleanly and removed the errors.

    Unless it needs more testing, it might be ready for RTBC

    Only question... Is this change backwards compatible? I don't know enough about PHP to know which version(s) will accept this change. From that thought, it might need some more work.

Production build 0.71.5 2024