void methods don't return anything. Especially when they always throw an exception
authorReedy <reedy@wikimedia.org>
Thu, 2 Jan 2014 16:21:59 +0000 (16:21 +0000)
committerReedy <reedy@wikimedia.org>
Thu, 2 Jan 2014 16:21:59 +0000 (16:21 +0000)
Change-Id: I6c959b44b64fdc38e248e0000a6594c12a10b6b4

includes/db/DatabaseMysqlBase.php

index 08fb2c9..14369bf 100644 (file)
@@ -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" );
                        }
                }