Index: trunk/phase3/includes/api/ApiQueryDeletedrevs.php |
— | — | @@ -236,7 +236,11 @@ |
237 | 237 | $rev['len'] = $row->ar_len; |
238 | 238 | } |
239 | 239 | if ( $fld_sha1 ) { |
240 | | - $rev['sha1'] = wfBaseConvert( $row->ar_sha1, 36, 16, 40 ); |
| 240 | + if ( $row->ar_sha1 != '' ) { |
| 241 | + $rev['sha1'] = wfBaseConvert( $row->ar_sha1, 36, 16, 40 ); |
| 242 | + } else { |
| 243 | + $rev['sha1'] = ''; |
| 244 | + } |
241 | 245 | } |
242 | 246 | if ( $fld_content ) { |
243 | 247 | ApiResult::setContent( $rev, Revision::getRevisionText( $row ) ); |
Index: trunk/phase3/includes/api/ApiQueryRevisions.php |
— | — | @@ -414,7 +414,11 @@ |
415 | 415 | } |
416 | 416 | |
417 | 417 | if ( $this->fld_sha1 ) { |
418 | | - $vals['sha1'] = wfBaseConvert( $revision->getSha1(), 36, 16, 40 ); |
| 418 | + if ( $revision->getSha1() != '' ) { |
| 419 | + $vals['sha1'] = wfBaseConvert( $revision->getSha1(), 36, 16, 40 ); |
| 420 | + } else { |
| 421 | + $vals['sha1'] = ''; |
| 422 | + } |
419 | 423 | } |
420 | 424 | |
421 | 425 | if ( $this->fld_comment || $this->fld_parsedcomment ) { |