Changeset 55157
- Timestamp:
- 01/28/2023 01:46:16 PM (20 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wpdb.php
r55151 r55157 1562 1562 $type = substr( $placeholder, -1 ); 1563 1563 1564 if ( 'f' === $type && true === $this->allow_unsafe_unquoted_parameters && str_ends_with( $split_query[ $key - 1 ], '%' ) ) { 1564 if ( 'f' === $type && true === $this->allow_unsafe_unquoted_parameters 1565 && 0 === substr_compare( $split_query[ $key - 1 ], '%', -1, 1 ) 1566 ) { 1565 1567 1566 1568 /* … … 1621 1623 * Second, if "%s" has a "%" before it, even if it's unrelated (e.g. "LIKE '%%%s%%'"). 1622 1624 */ 1623 if ( true !== $this->allow_unsafe_unquoted_parameters || ( '' === $format && ! str_ends_with( $split_query[ $key - 1 ], '%' ) ) ) { 1625 if ( true !== $this->allow_unsafe_unquoted_parameters 1626 || ( '' === $format && 0 !== substr_compare( $split_query[ $key - 1 ], '%', -1, 1 ) ) 1627 ) { 1624 1628 $placeholder = "'%" . $format . "s'"; 1625 1629 }
Note: See TracChangeset
for help on using the changeset viewer.