Skip to content

Commit

Permalink
Merge pull request #1183 from greenpeace/planet-5515
Browse files Browse the repository at this point in the history
PLANET-5515 When 0 search results set 204 http header
  • Loading branch information
comzeradd authored Sep 25, 2020
2 parents 2b7d081 + 5814a34 commit 8d326f4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Search.php
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@ protected function get_posts( $paged = 1 ) : array {
$posts = $this->query_posts( $paged );

if ( empty( $posts ) ) {
status_header( 204 );
return [];
}

Expand Down

0 comments on commit 8d326f4

Please sign in to comment.