build: Upgrade mediawiki-codesniffer from 26.0.0 to 28.0.0
[lhc/web/wiklou.git] / includes / Revision / SlotRecord.php
index 064f7a4..7465f79 100644 (file)
@@ -539,6 +539,11 @@ class SlotRecord {
                try {
                        $sha1 = $this->getStringField( 'content_sha1' );
                } catch ( IncompleteRevisionException $ex ) {
+                       $sha1 = null;
+               }
+
+               // Compute if missing. Missing could mean null or empty.
+               if ( $sha1 === null || $sha1 === '' ) {
                        $format = $this->hasField( 'format_name' )
                                ? $this->getStringField( 'format_name' )
                                : null;