mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Nuke
synced 2024-11-27 09:40:43 +00:00
Use WebRequest::getIntOrNull and avoid ctype_digit
This avoids the deprecation warning:
ctype_digit(): Argument of type null will be interpreted as string in the future
Bug: T322079
Change-Id: Id1e7ec7d73028339b53047ebfd6a975d23c3d180
(cherry picked from commit 698188afd4
)
This commit is contained in:
parent
d9b2447609
commit
5f353f8420
|
@ -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' ) )
|
||||
|
|
Loading…
Reference in a new issue