Changeset 64434
- Timestamp:
- 10/16/2026 10:48:16 PM (28 hours ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
src/wp-includes/class-wpdb.php (modified) (1 diff)
-
tests/phpunit/tests/db.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wpdb.php
r64305 r64434 966 966 } 967 967 968 $modes = array_ change_key_case( $modes, CASE_UPPER);968 $modes = array_map( 'strtoupper', $modes ); 969 969 970 970 /** -
trunk/tests/phpunit/tests/db.php
r64319 r64434 294 294 295 295 /** 296 * Test that SQL modes are set correctly 296 * Test that SQL modes are set correctly. 297 297 * 298 298 * @ticket 26847 … … 309 309 $check_new_modes = $wpdb->get_var( 'SELECT @@SESSION.sql_mode;' ); 310 310 $this->assertSameSets( $new_modes, explode( ',', $check_new_modes ) ); 311 312 $wpdb->set_sql_mode( empty( $current_modes ) ? array() : explode( ',', $current_modes ) ); 313 } 314 315 /** 316 * Test that SQL modes are uppercased correctly. 317 * 318 * @ticket 66326 319 */ 320 public function test_set_sql_mode_corrects_lowercase() { 321 global $wpdb; 322 323 $current_modes = $wpdb->get_var( 'SELECT @@SESSION.sql_mode;' ); 324 325 $new_modes = array( 'ignore_space', 'no_auto_value_on_zero' ); 326 327 $wpdb->set_sql_mode( $new_modes ); 328 329 $check_new_modes = $wpdb->get_var( 'SELECT @@SESSION.sql_mode;' ); 330 $this->assertSameSets( array_map( 'strtoupper', $new_modes ), explode( ',', $check_new_modes ) ); 311 331 312 332 $wpdb->set_sql_mode( empty( $current_modes ) ? array() : explode( ',', $current_modes ) );
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)