From f239598cb1796b1c59430ea6c2df84b5781b4b21 Mon Sep 17 00:00:00 2001 From: Reedy Date: Thu, 2 Jan 2014 16:21:59 +0000 Subject: [PATCH] void methods don't return anything. Especially when they always throw an exception Change-Id: I6c959b44b64fdc38e248e0000a6594c12a10b6b4 --- includes/db/DatabaseMysqlBase.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/db/DatabaseMysqlBase.php b/includes/db/DatabaseMysqlBase.php index 08fb2c9c71..14369bf1ed 100644 --- a/includes/db/DatabaseMysqlBase.php +++ b/includes/db/DatabaseMysqlBase.php @@ -95,7 +95,7 @@ abstract class DatabaseMysqlBase extends DatabaseBase { wfProfileOut( __METHOD__ ); - return $this->reportConnectionError( $error ); + $this->reportConnectionError( $error ); } if ( $dbName != '' ) { @@ -109,13 +109,13 @@ abstract class DatabaseMysqlBase extends DatabaseBase { wfProfileOut( __METHOD__ ); - return $this->reportConnectionError( "Error selecting database $dbName" ); + $this->reportConnectionError( "Error selecting database $dbName" ); } } // Tell the server what we're communicating with if ( !$this->connectInitCharset() ) { - return $this->reportConnectionError( "Error setting character set" ); + $this->reportConnectionError( "Error setting character set" ); } // Set SQL mode, default is turning them all off, can be overridden or skipped with null @@ -126,7 +126,7 @@ abstract class DatabaseMysqlBase extends DatabaseBase { if ( !$success ) { wfLogDBError( "Error setting sql_mode to $mode on server {$this->mServer}" ); wfProfileOut( __METHOD__ ); - return $this->reportConnectionError( "Error setting sql_mode to $mode" ); + $this->reportConnectionError( "Error setting sql_mode to $mode" ); } } -- 2.20.1