Skip to content

Commit 8253557

Browse files
authored
Added defensive check for wpcom taxonomies endpoint (#48070)
1 parent 81cce2e commit 8253557

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Significance: patch
2+
Type: bugfix
3+
4+
Fix taxonomies endpoint returning error when number parameter exceeds 1000.

projects/plugins/jetpack/json-endpoints/class.wpcom-json-api-get-taxonomies-endpoint.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@ public function callback( $path = '', $blog_id = 0 ) {
9797

9898
$args = $this->query_args();
9999
$args = $this->process_args( $args );
100+
if ( is_wp_error( $args ) ) {
101+
return $args;
102+
}
100103

101104
if ( preg_match( '#/tags#i', $path ) ) {
102105
return $this->tags( $args );

0 commit comments

Comments
 (0)