WordPress.org

Make WordPress Core

Ticket #14997: 14997-notices.2.patch

File 14997-notices.2.patch, 1.1 KB (added by hakre, 8 years ago)
  • wp-includes/query.php

     
    22052205                        $fields         = apply_filters_ref_array( 'posts_fields',              array( $fields, &$this ) );
    22062206
    22072207                        // Filter all clauses at once, for convenience
    2208                         $clauses = apply_filters_ref_array( 'posts_clauses', array( compact( $pieces ), &$this ) );
     2208                        $clauses = (array) apply_filters_ref_array( 'posts_clauses', array( compact( $pieces ), &$this ) );
    22092209                        foreach ( $pieces as $piece )
    22102210                                $$piece = isset( $clauses[ $piece ] ) ? $clauses[ $piece ] : '';
    22112211                }
     
    22242224                        $limits         = apply_filters_ref_array( 'post_limits_request',               array( $limits, &$this ) );
    22252225
    22262226                        // Filter all clauses at once, for convenience
    2227                         $clauses = apply_filters_ref_array( 'posts_clauses_request', array( compact( $pieces ), &$this ) );
     2227                        $clauses = (array) apply_filters_ref_array( 'posts_clauses_request', array( compact( $pieces ), &$this ) );
    22282228                        foreach ( $pieces as $piece )
    22292229                                $$piece = isset( $clauses[ $piece ] ) ? $clauses[ $piece ] : '';
    22302230                }