*/
protected function unserialize( $serial ) {
if ( function_exists( 'gzinflate' ) ) {
- MediaWiki\suppressWarnings();
+ Wikimedia\suppressWarnings();
$decomp = gzinflate( $serial );
- MediaWiki\restoreWarnings();
+ Wikimedia\restoreWarnings();
if ( false !== $decomp ) {
$serial = $decomp;
// 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 ) {