Also fix the condition in getPossibleErrors to avoid reporting of:
<error code="nosectiontitle" info="The sectiontitle parameter must be
set" />
Change-Id: Ifd808a040590ddffc0527da5ef0cc8cacdd008d9
$params = $this->getFinalParams();
if ( $params ) {
foreach ( $params as $paramName => $paramSettings ) {
- if ( isset( $paramSettings[ApiBase::PARAM_REQUIRED] ) ) {
+ if ( isset( $paramSettings[ApiBase::PARAM_REQUIRED] ) && $paramSettings[ApiBase::PARAM_REQUIRED] ) {
$ret[] = array( 'missingparam', $paramName );
}
}
'section' => null,
'sectiontitle' => array(
ApiBase::PARAM_TYPE => 'string',
- ApiBase::PARAM_REQUIRED => false,
),
'text' => null,
'token' => array(