X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiSetPageLanguage.php;h=84ab3ea98104de9f637fc04d1bbd3eaa09df3399;hb=8cd4986f24780107e1daff69dc27315e6dcc12e3;hp=7e3f1acf96eeb188ce3afde041584ea7c78710c6;hpb=2480aae0c97d822e10b50619e7b48b25c45af073;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiSetPageLanguage.php b/includes/api/ApiSetPageLanguage.php index 7e3f1acf96..84ab3ea981 100644 --- a/includes/api/ApiSetPageLanguage.php +++ b/includes/api/ApiSetPageLanguage.php @@ -1,9 +1,5 @@ " * * This program is free software; you can redistribute it and/or modify @@ -73,7 +69,7 @@ class ApiSetPageLanguage extends ApiBase { // If change tagging was requested, check that the user is allowed to tag, // and the tags are valid - if ( count( $params['tags'] ) ) { + if ( $params['tags'] ) { $tagStatus = ChangeTags::canAddTagsAccompanyingChange( $params['tags'], $user ); if ( !$tagStatus->isOK() ) { $this->dieStatus( $tagStatus ); @@ -84,7 +80,7 @@ class ApiSetPageLanguage extends ApiBase { $this, $titleObj, $params['lang'], - $params['reason'] === null ? '' : $params['reason'], + $params['reason'] ?? '', $params['tags'] ?: [] );