if ( $i === false ) {
$this->mLastError = 'No working slave server: ' . $this->mLastError;
wfProfileOut( __METHOD__ );
- $this->reportConnectionError( $this->mErrorConnection );
- return false;
+ return $this->reportConnectionError( $this->mErrorConnection );
}
}
$conn = $this->openConnection( $i, $wiki );
if ( !$conn ) {
wfProfileOut( __METHOD__ );
- $this->reportConnectionError( $this->mErrorConnection );
+ return $this->reportConnectionError( $this->mErrorConnection );
}
wfProfileOut( __METHOD__ );
} else {
$server = $conn->getProperty( 'mServer' );
wfLogDBError( "Connection error: {$this->mLastError} ({$server})\n" );
- $conn->reportConnectionError( "{$this->mLastError} ({$server})" );
+ $conn->reportConnectionError( "{$this->mLastError} ({$server})" ); // throws DBConnectionError
}
+ return false; /* not reached */
}
/**