Skip to content

Commit ecc760d

Browse files
committed
inline docs for crosscheck & cleanup
1 parent 3b9043d commit ecc760d

2 files changed

Lines changed: 12 additions & 4 deletions

File tree

wp-includes/sqlite/db.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@
1414
return;
1515
}
1616

17-
// @TODO: Remove before merging
18-
define( 'SQLITE_DEBUG_CROSSCHECK', false );
19-
error_reporting( E_ALL & ~E_DEPRECATED );
20-
2117
if ( ! extension_loaded( 'pdo' ) ) {
2218
wp_die(
2319
new WP_Error(
@@ -54,6 +50,12 @@
5450
require_once __DIR__ . '/class-wp-sqlite-db.php';
5551
require_once __DIR__ . '/install-functions.php';
5652

53+
/*
54+
* Debug: Cross-check with MySQL.
55+
* This is for debugging purpose only and requires files
56+
* that are present in the GitHub repository
57+
* but not the plugin published on WordPress.org.
58+
*/
5759
$crosscheck_tests_file_path = dirname( dirname( __DIR__ ) ) . '/tests/class-wp-sqlite-crosscheck-db.php';
5860
if ( defined( 'SQLITE_DEBUG_CROSSCHECK' ) && SQLITE_DEBUG_CROSSCHECK && file_exists( $crosscheck_tests_file_path ) ) {
5961
require_once $crosscheck_tests_file_path;

wp-includes/sqlite/install-functions.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,12 @@ function sqlite_make_db_sqlite() {
6464
}
6565
}
6666

67+
/*
68+
* Debug: Cross-check with MySQL.
69+
* This is for debugging purpose only and requires files
70+
* that are present in the GitHub repository
71+
* but not the plugin published on WordPress.org.
72+
*/
6773
if ( defined( 'SQLITE_DEBUG_CROSSCHECK' ) && SQLITE_DEBUG_CROSSCHECK ) {
6874
$host = DB_HOST;
6975
$port = 3306;

0 commit comments

Comments
 (0)