Skip to content

Commit dc1d3db

Browse files
Explicitly load the sqlite-database-integration/php-polyfills.php file
1 parent 072503e commit dc1d3db

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/Base.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ protected function load_dependencies() {
8383
}
8484

8585
// We also need to selectively load the necessary classes from the plugin.
86+
require_once $plugin_directory . '/php-polyfills.php';
8687
require_once $plugin_directory . '/constants.php';
8788
require_once $plugin_directory . '/wp-includes/sqlite/class-wp-sqlite-lexer.php';
8889
require_once $plugin_directory . '/wp-includes/sqlite/class-wp-sqlite-query-rewriter.php';

src/SQLite_Command.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ public function import( $args, $assoc_args ) {
7979
* @when before_wp_load
8080
*/
8181
public function export( $args, $assoc_args ) {
82+
if ( ! Export::get_sqlite_plugin_version() ) {
83+
WP_CLI::error( 'The SQLite integration plugin is not installed or activated.' );
84+
}
85+
8286
$is_porcelain = isset( $assoc_args['porcelain'] );
8387

8488
if ( ! $is_porcelain ) {
@@ -135,7 +139,7 @@ public function export( $args, $assoc_args ) {
135139
* @when before_wp_load
136140
*/
137141
public function tables( $args, $assoc_args ) {
138-
if ( ! Base::get_sqlite_plugin_version() ) {
142+
if ( ! Tables::get_sqlite_plugin_version() ) {
139143
WP_CLI::error( 'The SQLite integration plugin is not installed or activated.' );
140144
}
141145

0 commit comments

Comments
 (0)