Bug: T219882
Change-Id: I710d0abed6bd40dcea5bdd1c59c8d936565961eb
<?php
use MediaWiki\Widget\NamespacesMultiselectWidget;
<?php
use MediaWiki\Widget\NamespacesMultiselectWidget;
+use MediaWiki\MediaWikiServices;
/**
* Implements a tag multiselect input field for namespaces.
/**
* Implements a tag multiselect input field for namespaces.
}
foreach ( $namespaces as $namespace ) {
}
foreach ( $namespaces as $namespace ) {
- if ( $namespace < 0 ) {
+ if (
+ $namespace < 0 ||
+ !MediaWikiServices::getInstance()->getNamespaceInfo()->exists( $namespace )
+ ) {
return $this->msg( 'htmlform-select-badoption' );
}
return $this->msg( 'htmlform-select-badoption' );
}