From: Aaron Schulz Date: Thu, 1 Oct 2015 02:42:26 +0000 (-0700) Subject: Fixed remaning IDEA errors in DatabaseBase X-Git-Tag: 1.31.0-rc.0~9615^2 X-Git-Url: http://git.cyclocoop.org/%22.%20generer_url_ecrire%28%22sites_tous%22%2C%22%22%29.%20%22?a=commitdiff_plain;h=48906dde12f2380c2aaa147d1da7bec953b40eeb;p=lhc%2Fweb%2Fwiklou.git Fixed remaning IDEA errors in DatabaseBase Change-Id: Ife8d7ecd4f224f1e2ef6f729765c303ec69a3f5f --- diff --git a/includes/db/Database.php b/includes/db/Database.php index e4143c63c8..4bbb4915a3 100644 --- a/includes/db/Database.php +++ b/includes/db/Database.php @@ -1061,8 +1061,8 @@ abstract class DatabaseBase implements IDatabase { $res = $this->resultObject( $ret ); // Destroy profile sections in the opposite order to their creation - $queryProfSection = false; - $totalProfSection = false; + ScopedCallback::consume( $queryProfSection ); + ScopedCallback::consume( $totalProfSection ); if ( $isWriteQuery && $this->mTrxLevel ) { $this->mTrxWriteDuration += $queryRuntime; @@ -1232,6 +1232,7 @@ abstract class DatabaseBase implements IDatabase { * @param string|array $options The query options. See DatabaseBase::select() for details. * * @return bool|mixed The value from the field, or false on failure. + * @throws DBUnexpectedError */ public function selectField( $table, $var, $cond = '', $fname = __METHOD__, $options = array() @@ -3193,11 +3194,6 @@ abstract class DatabaseBase implements IDatabase { $args = func_get_args(); $function = array_shift( $args ); $tries = self::DEADLOCK_TRIES; - if ( is_array( $function ) ) { - $fname = $function[0]; - } else { - $fname = $function; - } $this->begin( __METHOD__ );