GatoGraphQL / GatoGraphQL

Interact with all your data in WordPress using GraphQL

Home Page:https://gatographql.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Remove `WP_DEBUG_DISPLAY` => `false` once WordPress works well with PHP 8.1

leoloso opened this issue · comments

After requiring PHP 8.1 for DEV (#1497), the Lando webserver with WordPress installed started showing deprecations:

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

Deprecated: rtrim(): Passing null to parameter #1 ($string) of type string is deprecated in /app/wordpress/wp-includes/formatting.php on line 2761

That's because WordPress is not yet fully compatible with PHP 8.1. These deprecation messages are annoying, and they prevent the GraphQL server from working, since these messages are also included in the JSON response, thus breaking it.

As a temporary solution, the messages are hidden by adding to wp-config.php:

define( 'WP_DEBUG_DISPLAY', false );

Once WordPress is fully compatible with PHP 8.1, remove this code. For that, search and delete all occurrences of WP_DEBUG_DISPLAY everywhere.