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' ) ) {
$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 ) );