Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v4 fix 720 pass 2 #729

Merged
merged 2 commits into from
May 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ index f2978644..e092beca 100644
$wpdb->show_errors = true;
- $wpdb->db_connect();
- ini_set( 'display_errors', 1 );
+ if ( ! $wpdb->check_connection() ) {
+ if ( ! $wpdb->check_connection(false) ) {
+ $wpdb->db_connect();
+ }
+ ini_set( 'display_errors', 1 );
Expand Down
2 changes: 1 addition & 1 deletion includes/core-phpunit/includes/abstract-testcase.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public static function set_up_before_class() {

$wpdb->suppress_errors = false;
$wpdb->show_errors = true;
if ( ! $wpdb->check_connection() ) {
if ( ! $wpdb->check_connection(false) ) {
$wpdb->db_connect();
}
ini_set( 'display_errors', 1 );
Expand Down
2 changes: 2 additions & 0 deletions includes/core-phpunit/includes/unregister-blocks-hooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@
remove_action( 'init', 'register_block_core_image' );
remove_action( 'init', 'register_block_core_latest_comments' );
remove_action( 'init', 'register_block_core_latest_posts' );
remove_action( 'init', 'register_block_core_list' );
remove_action( 'init', 'register_block_core_loginout' );
remove_action( 'init', 'register_block_core_media_text' );
remove_action( 'init', 'register_block_core_navigation' );
remove_action( 'init', 'register_block_core_navigation_link' );
remove_action( 'init', 'register_block_core_navigation_submenu' );
Expand Down
2 changes: 1 addition & 1 deletion includes/sqlite-database-integration/load.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: SQLite Database Integration
* Description: SQLite database driver drop-in.
* Author: The WordPress Team
* Version: 2.1.10
* Version: 2.1.11
* Requires PHP: 7.0
* Textdomain: sqlite-database-integration
*
Expand Down
2 changes: 1 addition & 1 deletion includes/sqlite-database-integration/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Contributors: wordpressdotorg, aristath
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 5.6
Stable tag: 2.1.10
Stable tag: 2.1.11
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: performance, database
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2803,9 +2803,10 @@ private function translate_on_duplicate_key( $table_name ) {
$this->rewriter->add( new WP_SQLite_Token( '(', WP_SQLite_Token::TYPE_OPERATOR ) );

$max = count( $conflict_columns );
foreach ( $conflict_columns as $i => $conflict_column ) {
$i = 0;
foreach ( $conflict_columns as $conflict_column ) {
$this->rewriter->add( new WP_SQLite_Token( '"' . $conflict_column . '"', WP_SQLite_Token::TYPE_KEYWORD, WP_SQLite_Token::FLAG_KEYWORD_KEY ) );
if ( $i !== $max - 1 ) {
if ( ++$i < $max ) {
$this->rewriter->add( new WP_SQLite_Token( ',', WP_SQLite_Token::TYPE_OPERATOR ) );
$this->rewriter->add( new WP_SQLite_Token( ' ', WP_SQLite_Token::TYPE_WHITESPACE ) );
}
Expand Down
Loading