}
$e = $this->conn->errorInfo();
- return isset( $e[2] ) ? $e[2] : '';
+ return $e[2] ?? '';
}
/**
return $this->lastAffectedRowCount;
}
+ function tableExists( $table, $fname = __METHOD__ ) {
+ $tableRaw = $this->tableName( $table, 'raw' );
+ if ( isset( $this->sessionTempTables[$tableRaw] ) ) {
+ return true; // already known to exist
+ }
+
+ $encTable = $this->addQuotes( $tableRaw );
+ $res = $this->query(
+ "SELECT 1 FROM sqlite_master WHERE type='table' AND name=$encTable" );
+
+ return $res->numRows() ? true : false;
+ }
+
/**
* Returns information about an index
* Returns false if the index does not exist
$args = func_get_args();
$function = array_shift( $args );
- return call_user_func_array( $function, $args );
+ return $function( ...$args );
}
/**
}
}
+/**
+ * @deprecated since 1.29
+ */
class_alias( DatabaseSqlite::class, 'DatabaseSqlite' );