WordPress.org

Make WordPress Core

Ticket #38856: 38856.diff

File 38856.diff, 627 bytes (added by stephdau, 5 years ago)
  • src/wp-includes/class-wp-site-query.php

     
    448448
    449449                if ( is_numeric( $this->query_vars['archived'] ) ) {
    450450                        $archived = absint( $this->query_vars['archived'] );
    451                         $this->sql_clauses['where']['archived'] = $wpdb->prepare( "archived = %d ", $archived );
     451                        $this->sql_clauses['where']['archived'] = $wpdb->prepare( "archived = %s ", absint( $archived ) );
    452452                }
    453453
    454454                if ( is_numeric( $this->query_vars['mature'] ) ) {