Changeset 52176 for trunk/src/wp-includes/wp-db.php
- Timestamp:
- 11/16/2021 02:57:53 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/wp-db.php
r51919 r52176 2016 2016 $this->flush(); 2017 2017 if ( $stripped_query !== $query ) { 2018 $this->insert_id = 0; 2018 $this->insert_id = 0; 2019 $this->last_query = $query; 2020 2021 if ( function_exists( '__' ) ) { 2022 $this->last_error = __( 'WordPress database error: Could not perform query because it contains invalid data.' ); 2023 } else { 2024 $this->last_error = 'WordPress database error: Could not perform query because it contains invalid data.'; 2025 } 2026 2019 2027 return false; 2020 2028 } … … 2536 2544 2537 2545 if ( $data !== $converted_data ) { 2546 2547 $problem_fields = array(); 2548 foreach ( $data as $field => $value ) { 2549 if ( $value !== $converted_data[ $field ] ) { 2550 $problem_fields[] = $field; 2551 } 2552 } 2553 2554 if ( 1 === count( $problem_fields ) ) { 2555 if ( function_exists( '__' ) ) { 2556 /* translators: %s Database field where the error occurred. */ 2557 $message = __( 'WordPress database error: Processing the value for the following field failed: %s. The supplied value may be too long or contains invalid data.' ); 2558 } else { 2559 $message = 'WordPress database error: Processing the value for the following field failed: %s. The supplied value may be too long or contains invalid data.'; 2560 } 2561 } else { 2562 if ( function_exists( '__' ) ) { 2563 /* translators: %s Database fields where the error occurred. */ 2564 $message = __( 'WordPress database error: Processing the value for the following fields failed: %s. The supplied value may be too long or contains invalid data.' ); 2565 } else { 2566 $message = 'WordPress database error: Processing the value for the following fields failed: %s. The supplied value may be too long or contains invalid data.'; 2567 } 2568 } 2569 2570 $this->last_error = sprintf( $message, implode( ', ', $problem_fields ) ); 2571 2538 2572 return false; 2539 2573 }
Note: See TracChangeset
for help on using the changeset viewer.