Skip to content

Commit 14be41a

Browse files
Prashanth ‎Prashanth ‎
authored andcommitted
Make it work with static-php build
1 parent 89ece22 commit 14be41a

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

activate.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ function ( $result ) {
7676
*/
7777
function sqlite_plugin_copy_db_file() {
7878
// Bail early if the PDO SQLite extension is not loaded.
79-
if ( ! extension_loaded( 'pdo_sqlite' ) ) {
79+
if ( ! extension_loaded( 'pdo_sqlite' ) && ! extension_loaded( 'sqlite3' ) ) {
8080
return;
8181
}
8282

admin-notices.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function sqlite_plugin_admin_notice() {
2020
}
2121

2222
// If PDO SQLite is not loaded, bail early.
23-
if ( ! extension_loaded( 'pdo_sqlite' ) ) {
23+
if ( ! extension_loaded( 'pdo_sqlite' ) && ! extension_loaded( 'sqlite3' )) {
2424
printf(
2525
'<div class="notice notice-error"><p>%s</p></div>',
2626
esc_html__( 'The SQLite Integration plugin is active, but the PDO SQLite extension is missing from your server. Please make sure that PDO SQLite is enabled in your PHP installation.', 'sqlite-database-integration' )

admin-page.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ function sqlite_integration_admin_screen() {
6161
);
6262
?>
6363
</p>
64-
<?php elseif ( ! extension_loaded( 'pdo_sqlite' ) ) : ?>
64+
<?php elseif ( ! extension_loaded( 'pdo_sqlite' ) && ! extension_loaded( 'sqlite3' ) ) : ?>
6565
<div class="notice notice-error">
6666
<p><?php esc_html_e( 'We detected that the PDO SQLite driver is missing from your server (the pdo_sqlite extension is not loaded). Please make sure that SQLite is enabled in your PHP installation before proceeding.', 'sqlite-database-integration' ); ?></p>
6767
</div>

wp-includes/sqlite/db.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
);
3434
}
3535

36-
if ( ! extension_loaded( 'pdo_sqlite' ) ) {
36+
if ( ! extension_loaded( 'pdo_sqlite' ) && ! extension_loaded( 'sqlite3' ) ) {
3737
wp_die(
3838
new WP_Error(
3939
'pdo_driver_not_loaded',

0 commit comments

Comments
 (0)