api: Remove redundant truthy check in ApiComparePages
If there is no content the if before would already throw with dieWithError Change-Id: I370aa6c6d33b372b03bfff0a5f1f02f391a6788a
This commit is contained in:
parent
c56fcf5e33
commit
46bdde8a8f
1 changed files with 1 additions and 1 deletions
|
|
@ -455,7 +455,7 @@ class ApiComparePages extends ApiBase {
|
|||
[ 'apierror-missingcontent-revid-role', $rev->getId(), SlotRecord::MAIN ], 'missingcontent'
|
||||
);
|
||||
}
|
||||
$content = $content ? $content->getSection( $section ) : null;
|
||||
$content = $content->getSection( $section );
|
||||
if ( !$content ) {
|
||||
$this->dieWithError(
|
||||
[ "apierror-compare-nosuch{$prefix}section", wfEscapeWikiText( $section ) ],
|
||||
|
|
|
|||
Loading…
Reference in a new issue