From 6930f15427476d9cca7597e9776a229b090f9e83 Mon Sep 17 00:00:00 2001 From: Arafat Zahan Date: Tue, 1 Nov 2022 16:46:38 +0600 Subject: [PATCH] Use Elvis operator. --- includes/Core/Admin/Screens.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/includes/Core/Admin/Screens.php b/includes/Core/Admin/Screens.php index 745c23fce33..9d9ef00cc08 100644 --- a/includes/Core/Admin/Screens.php +++ b/includes/Core/Admin/Screens.php @@ -367,10 +367,7 @@ private function get_screens() { 'render_callback' => function( Context $context ) { $is_view_only = ! $this->authentication->is_authenticated(); - $setup_slug = $context->input()->filter( INPUT_GET, 'slug' ); - if ( $setup_slug ) { - $setup_slug = htmlspecialchars( $setup_slug ); - } + $setup_slug = htmlspecialchars( $context->input()->filter( INPUT_GET, 'slug' ) ?: '' ); $reauth = $context->input()->filter( INPUT_GET, 'reAuth', FILTER_VALIDATE_BOOLEAN ); if ( $context->input()->filter( INPUT_GET, 'permaLink' ) ) { ?>