X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FAjaxDispatcher.php;h=5f825c8b5ac7bbf1b5cb09f5e00e9db66d95fd33;hb=5e2d030675f6ffaf3391e0483d10d6c4477a9231;hp=75fcff3654a10b34d8db41872d3deae7443e75db;hpb=7e105610397b55d67f42f31496e92496477500e3;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/AjaxDispatcher.php b/includes/AjaxDispatcher.php index 75fcff3654..5f825c8b5a 100644 --- a/includes/AjaxDispatcher.php +++ b/includes/AjaxDispatcher.php @@ -23,6 +23,9 @@ use MediaWiki\MediaWikiServices; +// Use superglobals, but since it's deprecated, it's not worth fixing +// phpcs:disable MediaWiki.Usage.SuperGlobalsUsage.SuperGlobals + /** * @defgroup Ajax Ajax */ @@ -73,7 +76,7 @@ class AjaxDispatcher { switch ( $this->mode ) { case 'get': - $this->func_name = isset( $_GET["rs"] ) ? $_GET["rs"] : ''; + $this->func_name = $_GET["rs"] ?? ''; if ( !empty( $_GET["rsargs"] ) ) { $this->args = $_GET["rsargs"]; } else { @@ -81,7 +84,7 @@ class AjaxDispatcher { } break; case 'post': - $this->func_name = isset( $_POST["rs"] ) ? $_POST["rs"] : ''; + $this->func_name = $_POST["rs"] ?? ''; if ( !empty( $_POST["rsargs"] ) ) { $this->args = $_POST["rsargs"]; } else {