Make WordPress Core

#57684 closed defect (bug) (duplicate)

Error after PHP 8.1 activation

Reported by: brmartinez's profile brmartinez Owned by:
Milestone: Priority: normal
Severity: major Version: 6.1.1
Component: Canonical Keywords:
Focuses: Cc:

Description (last modified by costdev)

Hey guys, I've noticed that these errors started appearing on my website since I've installed PHP 8.0. I've actually upgraded to PHP 8.1, and the errors persist.

Can you help me fix them? I can provide you with access to my site, if necessary.

PHP Error Log:

PHP Warning:  Undefined array key "host" in /wp-includes/canonical.php on line 689
PHP Warning:  Undefined array key "host" in /wp-includes/canonical.php on line 698
PHP Warning:  Undefined array key "host" in /wp-includes/canonical.php on line 701
PHP Warning:  Undefined array key "host" in /wp-includes/canonical.php on line 689
PHP Warning:  Undefined array key "host" in /wp-includes/canonical.php on line 698
PHP Warning:  Undefined array key "host" in /wp-includes/canonical.php on line 701
PHP Warning:  Undefined array key "scheme" in /wp-includes/canonical.php on line 722

Change History (1)

#1 @costdev
16 months ago

  • Description modified (diff)
  • Focuses performance coding-standards removed
  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Hi @brmartinez, welcome back to Trac!

I believe we're already tracking this issue in #34353 (see the latest comments in particular, which reference this notice (in PHP < 8.0)/warning (in PHP 8.0+).

Note: See TracTickets for help on using tickets.