Skip to:
Content

BuddyPress.org

Changeset 13557


Ignore:
Timestamp:
08/24/2023 07:45:32 PM (19 months ago)
Author:
imath
Message:

Improve table alias sanitization in BP_XProfile_Query

(Trunk)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-xprofile/classes/class-bp-xprofile-query.php

    r13475 r13557  
    341341     *
    342342     * @since 2.2.0
    343      * 
     343     *
    344344     * @global wpdb $wpdb WordPress database object.
    345345     *
     
    525525            $sibling_compare = strtoupper( $sibling['compare'] );
    526526            if ( in_array( $clause_compare, $compatible_compares ) && in_array( $sibling_compare, $compatible_compares ) ) {
    527                 $alias = $sibling['alias'];
     527                $alias = preg_replace( '/\W/', '_', $sibling['alias'] );
    528528                break;
    529529            }
Note: See TracChangeset for help on using the changeset viewer.