Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#54967 closed defect (bug) (duplicate)

Deprecation warning for PHP 8.1

Reported by: lxtx's profile lxtx Owned by:
Milestone: Priority: normal
Severity: trivial Version: 5.9
Component: External Libraries Keywords: php81
Focuses: Cc:

Description

After activating a theme(path: /wp-admin/themes.php), I got warnings as below, please take a look, THX

Deprecated: Return type of Requests_Cookie_Jar::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /www/wwwroot/php81.a.com/wp-includes/Requests/Cookie/Jar.php on line 63

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

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

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 /www/wwwroot/php81.a.com/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 /www/wwwroot/php81.a.com/wp-includes/Requests/Cookie/Jar.php on line 111

Deprecated: http_build_query(): Passing null to parameter #2 ($numeric_prefix) of type string is deprecated in /www/wwwroot/php81.a.com/wp-includes/Requests/Transport/cURL.php on line 345

Deprecated: Return type of Requests_Utility_CaseInsensitiveDictionary::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /www/wwwroot/php81.a.com/wp-includes/Requests/Utility/CaseInsensitiveDictionary.php on line 40

Deprecated: Return type of Requests_Utility_CaseInsensitiveDictionary::offsetGet($key) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /www/wwwroot/php81.a.com/wp-includes/Requests/Utility/CaseInsensitiveDictionary.php on line 51

Deprecated: Return type of Requests_Utility_CaseInsensitiveDictionary::offsetSet($key, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /www/wwwroot/php81.a.com/wp-includes/Requests/Utility/CaseInsensitiveDictionary.php on line 68

Deprecated: Return type of Requests_Utility_CaseInsensitiveDictionary::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 /www/wwwroot/php81.a.com/wp-includes/Requests/Utility/CaseInsensitiveDictionary.php on line 82

Deprecated: Return type of Requests_Utility_CaseInsensitiveDictionary::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /www/wwwroot/php81.a.com/wp-includes/Requests/Utility/CaseInsensitiveDictionary.php on line 91

Deprecated: setcookie(): Passing null to parameter #5 ($domain) of type string is deprecated in /www/wwwroot/php81.a.com/wp-includes/option.php on line 1109

Warning: Cannot modify header information - headers already sent by (output started at /www/wwwroot/php81.a.com/wp-includes/option.php:1109) in /www/wwwroot/php81.a.com/wp-includes/option.php on line 1109

Deprecated: setcookie(): Passing null to parameter #5 ($domain) of type string is deprecated in /www/wwwroot/php81.a.com/wp-includes/option.php on line 1110

Warning: Cannot modify header information - headers already sent by (output started at /www/wwwroot/php81.a.com/wp-includes/option.php:1109) in /www/wwwroot/php81.a.com/wp-includes/option.php on line 1110

Change History (2)

#1 @jrf
3 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Severity changed from major to trivial
  • Status changed from new to closed

Hi @lxtx, thanks for the report, but deprecations are nothing to be concerned about. Everything will still work as it should when WP_DEBUG is turned off (as it should be on live websites).

Also see this blogpost: https://make.wordpress.org/core/2022/01/10/wordpress-5-9-and-php-8-0-8-1/

The update of the Requests library is already being tracked in #54504, so I'm closing this issue as a duplicate.

#2 @SergeyBiryukov
3 years ago

  • Component changed from General to External Libraries
Note: See TracTickets for help on using tickets.