aboutsummaryrefslogtreecommitdiffstats
path: root/includes/api/ApiQueryLogEvents.php
diff options
context:
space:
mode:
authorUmherirrender <umherirrender_de.wp@web.de>2021-10-25 21:15:52 +0200
committerKrinkle <krinkle@fastmail.com>2022-03-21 18:25:07 +0000
commit1f71eccf6370c6e437092e4b24d4f4957cc47e84 (patch)
treef1f2feb09cfcef8d7cb1c7e9c5b4ab79cd12ca89 /includes/api/ApiQueryLogEvents.php
parent50938694e59f9928ea3a1e8a4144374034d43a2a (diff)
downloadmediawikicore-1f71eccf6370c6e437092e4b24d4f4957cc47e84.tar.gz
mediawikicore-1f71eccf6370c6e437092e4b24d4f4957cc47e84.zip
phan: Disable null_casts_as_any_type setting
Make phan stricter about null types by setting null_casts_as_any_type to false (the default in mediawiki-phan-config) Remaining false positive issues are suppressed. The suppression and the setting change can only be done together Bug: T242536 Bug: T301991 Change-Id: I0f295382b96fb3be8037a01c10487d9d591e7e01
Diffstat (limited to 'includes/api/ApiQueryLogEvents.php')
-rw-r--r--includes/api/ApiQueryLogEvents.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/includes/api/ApiQueryLogEvents.php b/includes/api/ApiQueryLogEvents.php
index a2f6d15ed367..48e543e8ba83 100644
--- a/includes/api/ApiQueryLogEvents.php
+++ b/includes/api/ApiQueryLogEvents.php
@@ -165,7 +165,9 @@ class ApiQueryLogEvents extends ApiQueryBase {
);
}
+ // @phan-suppress-next-line PhanTypeMismatchArgumentNullable T240141
$this->addWhereFld( 'log_type', $type );
+ // @phan-suppress-next-line PhanTypeMismatchArgumentNullable T240141
$this->addWhereFld( 'log_action', $action );
} elseif ( $params['type'] !== null ) {
$this->addWhereFld( 'log_type', $params['type'] );
@@ -322,6 +324,7 @@ class ApiQueryLogEvents extends ApiQueryBase {
}
if ( LogEventsList::userCan( $row, LogPage::DELETED_ACTION, $user ) ) {
if ( $this->fld_title ) {
+ // @phan-suppress-next-line PhanTypeMismatchArgumentNullable title is set when used
ApiQueryBase::addTitleInfo( $vals, $title );
}
if ( $this->fld_ids ) {