From f80076f5aac9c8ba05c06eb59febe1517c0b58f6 Mon Sep 17 00:00:00 2001 From: Reedy Date: Mon, 14 Oct 2024 15:43:12 +0100 Subject: [PATCH] SpecialLintErrors: Fix phan failure due to MW core change Caused by 7be5a303d162ad525e69fa57820ac6108ce175b2 Bug: T377145 Change-Id: Id9cd01a392ef620aecac6254f643c53a8f94a8c3 --- includes/SpecialLintErrors.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/SpecialLintErrors.php b/includes/SpecialLintErrors.php index fcd77da7..cf0aa22f 100644 --- a/includes/SpecialLintErrors.php +++ b/includes/SpecialLintErrors.php @@ -209,8 +209,8 @@ class SpecialLintErrors extends SpecialPage { } ); if ( $request->getCheck( 'wpNamespaceRestrictions' ) ) { - $namespaceRequestValues = $request->getRawVal( 'wpNamespaceRestrictions' ); - if ( strlen( $namespaceRequestValues ) > 0 ) { + $namespaceRequestValues = $request->getRawVal( 'wpNamespaceRestrictions' ) ?? ''; + if ( $namespaceRequestValues !== '' ) { $namespaceIDs = array_map( 'intval', explode( "\n", $namespaceRequestValues ) ); // Security measure: only allow active namespace IDs to reach the query $namespaces = array_values( array_intersect( $activeNamespaces, $namespaceIDs ) );