Cast to array, to avoid notices. props hakre. fixes #14997
git-svn-id: http://svn.automattic.com/wordpress/trunk@16576 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
14be097d5e
commit
f23d5de358
|
@ -2307,7 +2307,7 @@ class WP_Query {
|
|||
$fields = apply_filters_ref_array( 'posts_fields', array( $fields, &$this ) );
|
||||
|
||||
// Filter all clauses at once, for convenience
|
||||
$clauses = apply_filters_ref_array( 'posts_clauses', array( compact( $pieces ), &$this ) );
|
||||
$clauses = (array) apply_filters_ref_array( 'posts_clauses', array( compact( $pieces ), &$this ) );
|
||||
foreach ( $pieces as $piece )
|
||||
$$piece = isset( $clauses[ $piece ] ) ? $clauses[ $piece ] : '';
|
||||
}
|
||||
|
@ -2326,7 +2326,7 @@ class WP_Query {
|
|||
$limits = apply_filters_ref_array( 'post_limits_request', array( $limits, &$this ) );
|
||||
|
||||
// Filter all clauses at once, for convenience
|
||||
$clauses = apply_filters_ref_array( 'posts_clauses_request', array( compact( $pieces ), &$this ) );
|
||||
$clauses = (array) apply_filters_ref_array( 'posts_clauses_request', array( compact( $pieces ), &$this ) );
|
||||
foreach ( $pieces as $piece )
|
||||
$$piece = isset( $clauses[ $piece ] ) ? $clauses[ $piece ] : '';
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue