X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fobjectcache%2FSqlBagOStuff.php;h=6d356581515af52ac5ad1d97d055244ca7e63245;hp=c2860552c0cdf36cbd9ec2f97e8f079da8cd627d;hb=a2c8c2969420a0f150c03f76e3a0bf9028fcda43;hpb=58f37bd13c49f0e449d2373e09016799f9e35f48 diff --git a/includes/objectcache/SqlBagOStuff.php b/includes/objectcache/SqlBagOStuff.php index c2860552c0..6d35658151 100644 --- a/includes/objectcache/SqlBagOStuff.php +++ b/includes/objectcache/SqlBagOStuff.php @@ -681,9 +681,9 @@ class SqlBagOStuff extends BagOStuff { */ protected function unserialize( $serial ) { if ( function_exists( 'gzinflate' ) ) { - MediaWiki\suppressWarnings(); + Wikimedia\suppressWarnings(); $decomp = gzinflate( $serial ); - MediaWiki\restoreWarnings(); + Wikimedia\restoreWarnings(); if ( false !== $decomp ) { $serial = $decomp; @@ -808,6 +808,9 @@ class SqlBagOStuff extends BagOStuff { // Main LB is used; wait for any replica DBs to catch up $masterPos = $lb->getMasterPos(); + if ( !$masterPos ) { + return true; // not applicable + } $loop = new WaitConditionLoop( function () use ( $lb, $masterPos ) {