Merge "Use WebRequest::getIntOrNull and avoid ctype_digit"

This commit is contained in:
jenkins-bot 2022-11-04 18:08:44 +00:00 committed by Gerrit Code Review
commit ef0a197e58

View file

@ -72,8 +72,7 @@ class SpecialNuke extends SpecialPage {
$reason = $this->getDeleteReason( $this->getRequest(), $target );
$limit = $req->getInt( 'limit', 500 );
$namespace = $req->getRawVal( 'namespace' );
$namespace = ctype_digit( $namespace ) ? (int)$namespace : null;
$namespace = $req->getIntOrNull( 'namespace' );
if ( $req->wasPosted()
&& $currentUser->matchEditToken( $req->getVal( 'wpEditToken' ) )