Make WordPress Core

Opened 3 months ago

Last modified 3 months ago

#61201 new defect (bug)

PHP Warning: Array to string conversion error appears with PHP 8.1 (maybe previous versions too)

Reported by: djixas's profile DjiXas Owned by:
Milestone: Awaiting Review Priority: normal
Severity: minor Version: 6.5.3
Component: General Keywords: close reporter-feedback
Focuses: Cc:

Description

Just noticed this, cannot reproduce or figure out why it appears, but there are few random instances in the error log

[12-May-2024 08:13:17 UTC] PHP Warning: Array to string conversion in /homepublic_html/wp-includes/formatting.php on line 1108

Change History (1)

#1 @swissspidy
3 months ago

  • Keywords close reporter-feedback added

Hi there and welcome to WordPress Trac!

Such warnings usually occur when a plugin is using a WP-provided function in an incorrect way. In this case it's the wp_check_invalid_utf8() function. I recommend checking your active plugins & theme whether they are using that function somehow (usually through esc_html() or esc_js(). Just because the error message mentions wp-includes doesn't mean the error is also originating from WordPress. It's just where the error eventually happened.

Note: See TracTickets for help on using tickets.