#56612 closed defect (bug) (duplicate)
PHP 8.1.10 bug Core WP Deprecated errors
| Reported by: | egamestudio | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Administration | Version: | 6.0.2 |
| Severity: | trivial | Keywords: | php81 |
| Cc: | Focuses: |
Description
Hi,
I have a website with latest version 6.0.2 and PHP 8.1.10 and i receive this error in backend/frontend :
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
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
And many more
Change History (3)
This ticket was mentioned in PR #3301 on WordPress/wordpress-develop by thejaydip.
4 years ago
#1
- Keywords has-patch added
#2
@
4 years ago
- Keywords php81 added; has-patch removed
- Milestone Awaiting Review
- Resolution → duplicate
- Severity critical → trivial
- Status new → closed
#3
@
4 years ago
Display this kind of error with the latest WordPress 6.0.2 and PHP 8.1.10. Please find the attachment for more clarification.
Deprecated: rtrim(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/wordpress/project/wp-developer/wp-includes/formatting.php on line 2772
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Check non-empty variable before return may be it will work.
Trac ticket: https://core.trac.wordpress.org/ticket/56612