Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PHP 8.4 | wp_debug_mode(): remove use of E_STRICT
The `E_STRICT` constant is deprecated as of PHP 8.4 and will be removed in PHP 9.0 (commit went in today).

The error level hasn't been in use since PHP 8.0 anyway and was only barely still used in PHP 7.x, so removing the exclusion from the `error_reporting()` setting in the example code shouldn't really make any difference in practice.

Ref:
* https://wiki.php.net/rfc/deprecations_php_8_4#remove_e_strict_error_level_and_deprecate_e_strict_constant
  • Loading branch information
jrfnl committed Sep 18, 2024
commit 30a6aeaabfcbe7a2881ed3c60a024bcbfd5cb22b
2 changes: 1 addition & 1 deletion php/utils-wp.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function wp_debug_mode() {
define( 'WP_DEBUG', true );
}

error_reporting( E_ALL & ~E_DEPRECATED & ~E_STRICT );
error_reporting( E_ALL & ~E_DEPRECATED );
} else {
if ( WP_DEBUG ) {
error_reporting( E_ALL );
Expand Down