X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FRevision%2FSlotRecord.php;h=7465f790005b7eeeb5808b1d119f878decfd04d7;hb=e65f8ac5110804067366f9f239c13f4f29b66c3d;hp=89980f419fb6f660ac86513d1627dd9dfe320fb5;hpb=b3f03fd75efbf1a01910ccb27e9e8860de70aa29;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Revision/SlotRecord.php b/includes/Revision/SlotRecord.php index 89980f419f..7465f79000 100644 --- a/includes/Revision/SlotRecord.php +++ b/includes/Revision/SlotRecord.php @@ -219,8 +219,6 @@ class SlotRecord { } /** - * SlotRecord constructor. - * * The following fields are supported by the $row parameter: * * $row->blob_data @@ -541,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;