From a66569e2d05fa39b69319e3283051e30d46a0dd0 Mon Sep 17 00:00:00 2001 From: Ari Stathopoulos Date: Fri, 3 Mar 2023 14:29:18 +0200 Subject: [PATCH] check if SQLite3 exists --- src/wp-admin/setup-config.php | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/src/wp-admin/setup-config.php b/src/wp-admin/setup-config.php index a34a1b5c16986..f3cff57b2b58b 100644 --- a/src/wp-admin/setup-config.php +++ b/src/wp-admin/setup-config.php @@ -163,7 +163,13 @@ function setup_config_display_header( $body_classes = array() ) { _e( 'Before getting started' ); ?> -

+

+ + + + + +

  1. @@ -221,16 +227,18 @@ function setup_config_display_header( $body_classes = array() ) {

    - - - - - + + + + + + + @@ -287,7 +295,8 @@ function setup_config_display_header( $body_classes = array() ) { $GLOBALS['wp_locale'] = new WP_Locale(); $dbtype = trim( wp_unslash( $_POST['dbtype'] ) ); - $dbtype = 'sqlite' === $dbtype ? 'sqlite' : 'mysql'; + $dbtype = class_exists( 'SQLite3' ) && 'sqlite' === $dbtype ? 'sqlite' : 'mysql'; + $dbname = trim( wp_unslash( $_POST['dbname'] ) ); $uname = trim( wp_unslash( $_POST['uname'] ) ); $pwd = trim( wp_unslash( $_POST['pwd'] ) );