File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -307,6 +307,11 @@ public function db_connect( $allow_bail = true ) {
307307 $ pdo = $ GLOBALS ['@pdo ' ];
308308 }
309309 if ( defined ( 'WP_SQLITE_AST_DRIVER ' ) && WP_SQLITE_AST_DRIVER ) {
310+ if ( null === $ this ->dbname || '' === $ this ->dbname ) {
311+ $ this ->bail ( 'The database name was not set. ' , 'db_connect_fail ' );
312+ return false ;
313+ }
314+
310315 require_once __DIR__ . '/../../wp-includes/parser/class-wp-parser-grammar.php ' ;
311316 require_once __DIR__ . '/../../wp-includes/parser/class-wp-parser.php ' ;
312317 require_once __DIR__ . '/../../wp-includes/parser/class-wp-parser-node.php ' ;
Original file line number Diff line number Diff line change 6666 require_once $ crosscheck_tests_file_path ;
6767 $ GLOBALS ['wpdb ' ] = new WP_SQLite_Crosscheck_DB ( DB_NAME );
6868} else {
69- $ GLOBALS ['wpdb ' ] = new WP_SQLite_DB ( DB_NAME );
69+ $ GLOBALS ['wpdb ' ] = new WP_SQLite_DB ( defined ( ' DB_NAME ' ) ? DB_NAME : '' );
7070}
You can’t perform that action at this time.
0 commit comments