Replace use of &$this
[lhc/web/wiklou.git] / includes / libs / rdbms / database / Database.php
index b9beac8..d15d6f1 100644 (file)
@@ -26,6 +26,7 @@
 use Psr\Log\LoggerAwareInterface;
 use Psr\Log\LoggerInterface;
 use Wikimedia\ScopedCallback;
+use Wikimedia\Rdbms\TransactionProfiler;
 
 /**
  * Relational database abstraction object
@@ -1419,9 +1420,8 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware
                }
 
                $table = $this->tableName( $table );
-               $old = $this->ignoreErrors( true );
-               $res = $this->query( "SELECT 1 FROM $table LIMIT 1", $fname );
-               $this->ignoreErrors( $old );
+               $ignoreErrors = true;
+               $res = $this->query( "SELECT 1 FROM $table LIMIT 1", $fname, $ignoreErrors );
 
                return (bool)$res;
        }
@@ -2314,7 +2314,7 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware
                        $selectOptions );
 
                if ( is_array( $srcTable ) ) {
-                       $srcTable = implode( ',', array_map( [ &$this, 'tableName' ], $srcTable ) );
+                       $srcTable = implode( ',', array_map( [ $this, 'tableName' ], $srcTable ) );
                } else {
                        $srcTable = $this->tableName( $srcTable );
                }