X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FHistoryBlob.php;h=bca6c7e5bc5f3cac6edecebf60b1af78f54c4297;hb=e221e45a224292abaa902fd3a89c6c0c05fc6ec5;hp=1d4f6e4e8d8ef8dd883ae9f1efde892fd865153f;hpb=c1edd28ba660411ecc4207533d522926c82913fc;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/HistoryBlob.php b/includes/HistoryBlob.php index 1d4f6e4e8d..bca6c7e5bc 100644 --- a/includes/HistoryBlob.php +++ b/includes/HistoryBlob.php @@ -445,8 +445,7 @@ class DiffHistoryBlob implements HistoryBlob { // Already compressed return; } - if ( !count( $this->mItems ) ) { - // Empty + if ( $this->mItems === [] ) { return; } @@ -492,7 +491,7 @@ class DiffHistoryBlob implements HistoryBlob { $this->mDiffs = []; $this->mDiffMap = []; foreach ( $sequences as $seq ) { - if ( !count( $seq['diffs'] ) ) { + if ( $seq['diffs'] === [] ) { continue; } if ( $tail === '' ) { @@ -627,8 +626,7 @@ class DiffHistoryBlob implements HistoryBlob { */ function __sleep() { $this->compress(); - if ( !count( $this->mItems ) ) { - // Empty object + if ( $this->mItems === [] ) { $info = false; } else { // Take forward differences to improve the compression ratio for sequences