From: Reedy Date: Thu, 2 Jan 2014 16:21:59 +0000 (+0000) Subject: void methods don't return anything. Especially when they always throw an exception X-Git-Tag: 1.31.0-rc.0~17429 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=commitdiff_plain;h=f239598cb1796b1c59430ea6c2df84b5781b4b21;p=lhc%2Fweb%2Fwiklou.git void methods don't return anything. Especially when they always throw an exception Change-Id: I6c959b44b64fdc38e248e0000a6594c12a10b6b4 --- 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" ); } }