From 253e1e0413751efb8e9b442518173191b3206973 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 20 Apr 2021 14:49:08 +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. Built from https://develop.svn.wordpress.org/trunk@50772 git-svn-id: http://core.svn.wordpress.org/trunk@50381 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/network/settings.php | 29 +++++++++++++++++++++++------ wp-includes/version.php | 2 +- 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/wp-admin/network/settings.php b/wp-admin/network/settings.php index a96c336735..edbac81b2e 100644 --- a/wp-admin/network/settings.php +++ b/wp-admin/network/settings.php @@ -242,7 +242,16 @@ if ( isset( $_GET['updated'] ) ) { - + +

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