Skip to content
This repository was archived by the owner on Sep 24, 2018. It is now read-only.

Commit 8001a73

Browse files
Merge pull request #1734 from WP-API/1733-filter-array
Only process `filter` when it's an array
2 parents ba185d1 + d5decca commit 8001a73

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/endpoints/class-wp-rest-posts-controller.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public function get_items( $request ) {
8989
$args['paged'] = $request['page'];
9090
$args['posts_per_page'] = $request['per_page'];
9191

92-
if ( isset( $request['filter'] ) ) {
92+
if ( is_array( $request['filter'] ) ) {
9393
$args = array_merge( $args, $request['filter'] );
9494
unset( $args['filter'] );
9595
}

0 commit comments

Comments
 (0)