Skip to content

Commit 356d8f0

Browse files
committed
fix: check if max_page is set
This avoids the warning: PHP message: PHP Warning: Undefined variable $max_page in that otherwise occurs
1 parent d4f77f1 commit 356d8f0

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)