Skip to content

Commit 44a3cc5

Browse files
authored
Merge pull request #66 from donbowman/fix-undef-max-page
fix: check if max_page is set
2 parents d4f77f1 + 356d8f0 commit 44a3cc5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

feed-json-functions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ function get_link_from_json_feed( $link ) {
5151

5252
function get_json_feed_next_url() {
5353
global $paged, $wp_query;
54-
if ( ! $max_page ) {
54+
if ( ! isset($max_page) || ! $max_page ) {
5555
$max_page = $wp_query->max_num_pages;
5656
}
5757

0 commit comments

Comments
 (0)