Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
use Throwable;
use WP_SQLite_Driver;
use WP_SQLite_Connection;
use PDO;

SqlDriver::$drivers = array("server" => "MySQL / MariaDB") + SqlDriver::$drivers;

if (!defined('Adminer\DRIVER')) {
Expand Down Expand Up @@ -103,10 +101,8 @@ class Db extends SqlDb {

function attach($server, $username, $password) {
global $wp_env;
$pdo = new PDO('sqlite:' . $wp_env['db']['path']);
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$this->driver = new WP_SQLite_Driver(
new WP_SQLite_Connection(array('pdo' => $pdo)),
new WP_SQLite_Connection(array('path' => $wp_env['db']['path'])),
'wordpress'
);
return $this;
Expand Down
5 changes: 1 addition & 4 deletions packages/playground/tools/src/phpmyadmin/DbiMysqli.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
use Closure;
use Exception;
use Generator;
use PDO;
use PhpMyAdmin\FieldMetadata;
use PhpMyAdmin\Query\Utilities;
use Throwable;
Expand Down Expand Up @@ -260,10 +259,8 @@ class DbiMysqli implements DbiExtension {

public function connect($user, $password, array $server) {
global $wp_env;
$pdo = new PDO('sqlite:' . $wp_env['db']['path']);
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$this->driver = new WP_SQLite_Driver(
new WP_SQLite_Connection(array('pdo' => $pdo)),
new WP_SQLite_Connection(array('path' => $wp_env['db']['path'])),
'wordpress'
);
return $this->driver;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
use Throwable;
use WP_SQLite_Driver;
use WP_SQLite_Connection;
use PDO;

SqlDriver::$drivers = array("server" => "MySQL / MariaDB") + SqlDriver::$drivers;

if (!defined('Adminer\DRIVER')) {
Expand Down Expand Up @@ -103,10 +101,8 @@ class Db extends SqlDb {

function attach($server, $username, $password) {
global $wp_env;
$pdo = new PDO('sqlite:' . $wp_env['db']['path']);
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$this->driver = new WP_SQLite_Driver(
new WP_SQLite_Connection(array('pdo' => $pdo)),
new WP_SQLite_Connection(array('path' => $wp_env['db']['path'])),
'wordpress'
);
return $this;
Expand Down
Loading