Make WordPress Core

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#57511 closed defect (bug) (duplicate)

Deprecated: Return type of Requests_Cookie_Jar when activating PHP 8.1

Reported by: oldrup's profile oldrup Owned by:
Milestone: Priority: normal
Severity: normal Version: 6.1.1
Component: External Libraries Keywords:
Focuses: Cc:

Description

If updating from PHP 8.0 to PHP 8.1, different variants of the following two errors are thrown when selecting "View details" in the plugins list.

Deprecated: Return type of Requests_Cookie_Jar::offsetUnset($key) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /serverurl/wp-includes/Requests/Cookie/Jar.php on line 102

Deprecated: Return type of Requests_Cookie_Jar::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /serverurl/wp-includes/Requests/Cookie/Jar.php on line 111
  • WordPress 6.1.1.
  • All plugins disabled.
  • Tested with Twenty Sixteen and Blocksy theme.
  • No errors when downgrading to PHP 8.0.

Please let me know if I can supply more details to help to get rid of these errors :)

Change History (2)

#1 @swissspidy
2 years ago

  • Component changed from General to External Libraries
  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Thanks for your report!

This is a known issue that has already been fixed in #54504 for WordPress 6.2 due out in March.

#2 @oldrup
2 years ago

Beautiful. I *did* try to read that ticket, but I wasn't confident it applied. :)

Thank you for your patience ;)

Note: See TracTickets for help on using tickets.