Skip to content

Commit 248c544

Browse files
author
Kateryna Kodonenko
committed
Remove new structure variable
1 parent 5389763 commit 248c544

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

‎src/SQLiteDatabaseIntegrationLoader.php‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,12 @@ public static function load_plugin() {
8181
define( 'SQLITE_DB_DROPIN_VERSION', $sqlite_plugin_version ); // phpcs:ignore
8282
}
8383

84-
// In v2.2.21+, files moved into wp-includes/database/ subdirectories.
85-
$new_structure = file_exists( $plugin_directory . '/wp-includes/database/php-polyfills.php' );
8684
$new_driver_enabled = defined( 'WP_SQLITE_AST_DRIVER' ) && WP_SQLITE_AST_DRIVER;
85+
$old_structure = file_exists( $plugin_directory . '/php-polyfills.php' );
8786

88-
require_once $new_structure
89-
? $plugin_directory . '/wp-includes/database/php-polyfills.php'
90-
: $plugin_directory . '/php-polyfills.php';
87+
if ( $old_structure ) {
88+
require_once $plugin_directory . '/php-polyfills.php';
89+
}
9190
require_once $plugin_directory . '/constants.php';
9291

9392
if ( $new_driver_enabled ) {

0 commit comments

Comments
 (0)