Skip to:
Content

bbPress.org

Opened 2 years ago

Closed 4 months ago

Last modified 4 months ago

#3585 closed defect (bug) (fixed)

Function utf8_encode() is deprecated since PHP 8.2

Reported by: philipjohn's profile philipjohn Owned by: johnjamesjacoby's profile johnjamesjacoby
Milestone: 2.6.14 Priority: normal
Severity: normal Version: trunk
Component: Tools - Warnings/Notices Keywords: commit
Cc:

Description

PHPCS running on PHP v8.2 gives us the following warning:

Function utf8_encode() is deprecated since PHP 8.2; Use mb_convert_encoding(), UConverter::transcode() or iconv instead (PHPCompatibility.FunctionUse.RemovedFunctions.utf8_encodeDeprecated)

It affects two places:

  • includes/replies/template.php:1103
  • includes/topics/template.php:1336

Change History (4)

#1 @probbpress
2 years ago

Version 0, edited 2 years ago by probbpress (next)

#2 @johnjamesjacoby
4 months ago

  • Keywords commit added
  • Milestone changed from Awaiting Review to 2.6.14
  • Owner set to johnjamesjacoby
  • Status changed from new to assigned
  • Version changed from 2.6.9 to trunk

#3 @johnjamesjacoby
4 months ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 7334:

Tools - Warnings/Notices: begin phasing out of utf8_encode() for PHP 8.2 and higher.

This change moves the existing utf8_encode() usages into a new common formatting function: bbp_format_user_display_name(), and uses this new function to abstract & encapsulate checking that mbstring equivalents are loaded & supported.

Props philipjohn.

In branches/2.6, for 2.6.14.

Fixes #3585.

#4 @johnjamesjacoby
4 months ago

In 7335:

Tools - Warnings/Notices: begin phasing out of utf8_encode() for PHP 8.2 and higher.

This change moves the existing utf8_encode() usages into a new common formatting function: bbp_format_user_display_name(), and uses this new function to abstract & encapsulate checking that mbstring equivalents are loaded & supported.

Props philipjohn.

In trunk, for 2.7.

Fixes #3585.

Note: See TracTickets for help on using tickets.