From e31e5e7f4dcfd2a99c33fefcdc5c4e041634b432 Mon Sep 17 00:00:00 2001 From: SergeyBiryukov Date: Tue, 20 Apr 2021 14:47:02 +0000 Subject: [PATCH] Code Modernization: Bring consistency to preparing some fields on Network Settings screen: * `illegal_names` * `limited_email_domains` * `banned_email_domains` If any of these options have a falsey value, treat it as an empty string. This addresses a PHP 8.1+ deprecation notice when passing a `null` value to `str_replace()`. Additionally, avoid unnecessary type casting for better performance. Props hellofromTonya, jrf, SergeyBiryukov. See #51423. git-svn-id: https://develop.svn.wordpress.org/trunk@50772 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/network/settings.php | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/src/wp-admin/network/settings.php b/src/wp-admin/network/settings.php index a96c336735..edbac81b2e 100644 --- a/src/wp-admin/network/settings.php +++ b/src/wp-admin/network/settings.php @@ -242,7 +242,16 @@ if ( isset( $_GET['updated'] ) ) { - + +

@@ -254,10 +263,16 @@ if ( isset( $_GET['updated'] ) ) {