Fatal error: Uncaught DivisionByZeroError: Division by zero
-
On a custom query via a WP rest API call I get a fatal error, after changing the code on line 339 in the main plugin file it works correct.
I replaced the following lines://$posts_per_page = intval(get_query_var(‘posts_per_page’));
//$pages = intval(ceil($wp_query->found_posts / $posts_per_page));$posts_per_page = (int) get_query_var(‘posts_per_page’);
if ($posts_per_page <= 0) {
$posts_per_page = (int) get_option(‘posts_per_page’, 10);
}$pages = (int) ceil($wp_query->found_posts / $posts_per_page);
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
You must be logged in to reply to this topic.