Use Elvis operator where possible in API
[lhc/web/wiklou.git] / includes / api / ApiQueryRevisionsBase.php
index c12393d..5f5d157 100644 (file)
@@ -332,7 +332,7 @@ abstract class ApiQueryRevisionsBase extends ApiQueryGeneratorBase {
                        }
 
                        if ( $text === null ) {
-                               $format = $this->contentFormat ? $this->contentFormat : $content->getDefaultFormat();
+                               $format = $this->contentFormat ?: $content->getDefaultFormat();
                                $model = $content->getModel();
 
                                if ( !$content->isSupportedFormat( $format ) ) {