SpecialLintErrors: Fix phan failure due to MW core change

Caused by 7be5a303d162ad525e69fa57820ac6108ce175b2

Bug: T377145
Change-Id: Id9cd01a392ef620aecac6254f643c53a8f94a8c3
This commit is contained in:
Reedy 2024-10-14 15:43:12 +01:00
parent 5faac3fe93
commit f80076f5aa

View file

@ -209,8 +209,8 @@ class SpecialLintErrors extends SpecialPage {
} }
); );
if ( $request->getCheck( 'wpNamespaceRestrictions' ) ) { if ( $request->getCheck( 'wpNamespaceRestrictions' ) ) {
$namespaceRequestValues = $request->getRawVal( 'wpNamespaceRestrictions' ); $namespaceRequestValues = $request->getRawVal( 'wpNamespaceRestrictions' ) ?? '';
if ( strlen( $namespaceRequestValues ) > 0 ) { if ( $namespaceRequestValues !== '' ) {
$namespaceIDs = array_map( 'intval', explode( "\n", $namespaceRequestValues ) ); $namespaceIDs = array_map( 'intval', explode( "\n", $namespaceRequestValues ) );
// Security measure: only allow active namespace IDs to reach the query // Security measure: only allow active namespace IDs to reach the query
$namespaces = array_values( array_intersect( $activeNamespaces, $namespaceIDs ) ); $namespaces = array_values( array_intersect( $activeNamespaces, $namespaceIDs ) );