Skip to content

Commit

Permalink
Merge pull request #3836 from pods-framework/feature/#3823
Browse files Browse the repository at this point in the history
Fix slash problem with LIKE statements
  • Loading branch information
sc0ttkclark committed Jan 18, 2017
2 parents f75aff0 + b3f87cb commit 9dc08a2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions includes/data.php
Expand Up @@ -111,13 +111,14 @@ function pods_sanitize_like( $input ) {
}
else {
global $wpdb;
$input = pods_unslash( $input );

if ( pods_version_check( 'wp', '4.0' ) ) {
$output = $wpdb->esc_like( pods_sanitize( $input ) );
$output = pods_sanitize( $wpdb->esc_like( $input ) );
}
else {
// like_escape is deprecated in WordPress 4.0
$output = like_escape( pods_sanitize( $input ) );
$output = pods_sanitize( like_escape( $input ) );
}
}

Expand Down

0 comments on commit 9dc08a2

Please sign in to comment.