[wp-trac] [WordPress Trac] #54967: Deprecation warning for PHP 8.1

WordPress Trac noreply at wordpress.org
Fri Jan 28 06:43:57 UTC 2022


#54967: Deprecation warning for PHP 8.1
--------------------------+-----------------------------
 Reporter:  lxtx          |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  5.9
 Severity:  major         |   Keywords:  php81
  Focuses:                |
--------------------------+-----------------------------
 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
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/54967>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list