Api: Avoid type error in AbuseLogPrivateDetails

Make the `reason` parameter default to the empty string, so that we
don't end up passing null to ManualLogEntry::setComment.

Bug: T373010
Change-Id: Ifca828401628368bdddae14df2bbeb7391b2c02d
This commit is contained in:
Daimona Eaytoy 2024-08-21 14:31:46 +02:00
parent f65ed2b7a1
commit dcc271b636

View file

@ -124,6 +124,7 @@ class AbuseLogPrivateDetails extends ApiBase {
'reason' => [
ParamValidator::PARAM_TYPE => 'string',
ParamValidator::PARAM_REQUIRED => $this->getConfig()->get( 'AbuseFilterPrivateDetailsForceReason' ),
ParamValidator::PARAM_DEFAULT => '',
]
];
}