Improve docs for Title::getInternalURL/getCanonicalURL
[lhc/web/wiklou.git] / includes / HistoryBlob.php
index 26a6d45..bca6c7e 100644 (file)
@@ -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 === '' ) {
@@ -519,9 +518,9 @@ class DiffHistoryBlob implements HistoryBlob {
        function diff( $t1, $t2 ) {
                # Need to do a null concatenation with warnings off, due to bugs in the current version of xdiff
                # "String is not zero-terminated"
-               MediaWiki\suppressWarnings();
+               Wikimedia\suppressWarnings();
                $diff = xdiff_string_rabdiff( $t1, $t2 ) . '';
-               MediaWiki\restoreWarnings();
+               Wikimedia\restoreWarnings();
                return $diff;
        }
 
@@ -532,9 +531,9 @@ class DiffHistoryBlob implements HistoryBlob {
         */
        function patch( $base, $diff ) {
                if ( function_exists( 'xdiff_string_bpatch' ) ) {
-                       MediaWiki\suppressWarnings();
+                       Wikimedia\suppressWarnings();
                        $text = xdiff_string_bpatch( $base, $diff ) . '';
-                       MediaWiki\restoreWarnings();
+                       Wikimedia\restoreWarnings();
                        return $text;
                }
 
@@ -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