plugins - WordPress Throwing Deprecated Errors on its own Files

admin2025-01-07  3

My WordPress Website is throwing PHP Deprecated Errors on wp-include files.

I am novice WordPress Developer working on my site.

I am being flooded by these errors and extremely high CPU consumption on my site. Activating a specific set of plugins results in Deprecated Error in my WordPress installation.

I am using PHP7.4, and have experienced the same on PHP 8.1 as well.

Since these errors origniate from wp-includes folder I suspect WordPress is trying to tell me something that I am not understanding.

Secondly, what the hell is this "Cookie Jar"?

[16-Mar-2023 18:08:11 UTC] PHP 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 public_html/wp-includes/Requests/Cookie/Jar.php on line 63
[16-Mar-2023 18:08:11 UTC] PHP 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 public_html/wp-includes/Requests/Cookie/Jar.php on line 73
[16-Mar-2023 18:08:11 UTC] PHP 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 public_html/wp-includes/Requests/Cookie/Jar.php on line 89
[16-Mar-2023 18:08:11 UTC] PHP 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 public_html/wp-includes/Requests/Cookie/Jar.php on line 102
[16-Mar-2023 18:08:11 UTC] PHP 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 public_html/wp-includes/Requests/Cookie/Jar.php on line 111
[16-Mar-2023 18:08:12 UTC] PHP 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 public_html/wp-includes/Requests/Utility/CaseInsensitiveDictionary.php on line 40
[16-Mar-2023 18:08:12 UTC] PHP 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 public_html/wp-includes/Requests/Utility/CaseInsensitiveDictionary.php on line 51
[16-Mar-2023 18:08:12 UTC] PHP 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 public_html/wp-includes/Requests/Utility/CaseInsensitiveDictionary.php on line 68
[16-Mar-2023 18:08:12 UTC] PHP 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 public_html/wp-includes/Requests/Utility/CaseInsensitiveDictionary.php on line 82
[16-Mar-2023 18:08:12 UTC] PHP 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 public_html/wp-includes/Requests/Utility/CaseInsensitiveDictionary.php on line 91


Please advice as to what could be possibly wrong with it.

My WordPress Website is throwing PHP Deprecated Errors on wp-include files.

I am novice WordPress Developer working on my site.

I am being flooded by these errors and extremely high CPU consumption on my site. Activating a specific set of plugins results in Deprecated Error in my WordPress installation.

I am using PHP7.4, and have experienced the same on PHP 8.1 as well.

Since these errors origniate from wp-includes folder I suspect WordPress is trying to tell me something that I am not understanding.

Secondly, what the hell is this "Cookie Jar"?

[16-Mar-2023 18:08:11 UTC] PHP 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 public_html/wp-includes/Requests/Cookie/Jar.php on line 63
[16-Mar-2023 18:08:11 UTC] PHP 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 public_html/wp-includes/Requests/Cookie/Jar.php on line 73
[16-Mar-2023 18:08:11 UTC] PHP 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 public_html/wp-includes/Requests/Cookie/Jar.php on line 89
[16-Mar-2023 18:08:11 UTC] PHP 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 public_html/wp-includes/Requests/Cookie/Jar.php on line 102
[16-Mar-2023 18:08:11 UTC] PHP 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 public_html/wp-includes/Requests/Cookie/Jar.php on line 111
[16-Mar-2023 18:08:12 UTC] PHP 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 public_html/wp-includes/Requests/Utility/CaseInsensitiveDictionary.php on line 40
[16-Mar-2023 18:08:12 UTC] PHP 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 public_html/wp-includes/Requests/Utility/CaseInsensitiveDictionary.php on line 51
[16-Mar-2023 18:08:12 UTC] PHP 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 public_html/wp-includes/Requests/Utility/CaseInsensitiveDictionary.php on line 68
[16-Mar-2023 18:08:12 UTC] PHP 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 public_html/wp-includes/Requests/Utility/CaseInsensitiveDictionary.php on line 82
[16-Mar-2023 18:08:12 UTC] PHP 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 public_html/wp-includes/Requests/Utility/CaseInsensitiveDictionary.php on line 91


Please advice as to what could be possibly wrong with it.

Share Improve this question asked Mar 16, 2023 at 18:33 Amit BajarAmit Bajar 33 bronze badges 3
  • Are you sure PHP 7.4 is the problem? What you're sharing is a PHP 8.1 issue, and one that has fixes in the upcoming WP 6.2 – Tom J Nowell Commented Mar 16, 2023 at 19:23
  • alternatively, you're using Requests v2 in a plugin or library despite WP itself using Requests v1, the two are not compatible. ( WP 6.2 upgrades Requests v2 to improve PHP 8.X support ). If it is a PHP version issue then downgrading to 7.4 would resolve this – Tom J Nowell Commented Mar 16, 2023 at 19:36
  • Even though the errors are coming from WP Core, many times they come due to any third-party app (themes, plugins, etc.). To debug them a long time ago I prepared a
转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1736259263a576.html

最新回复(0)