Favorite Nodes Profile Limit = 0 does not work
rares - March 28, 2009 - 00:05
| Project: | Favorite Nodes |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Description
On my setup, I use the block and views to display favorites, and want to keep them confidential for each user. To that avail, I set Favorite Nodes Profile Limit to 0. When I try to view the profile, I get
warning: Division by zero in .../includes/pager.inc on line 73.

#1
Looking at the code, I found in
function favorite_nodes_get($uid, $type = NULL, $limit = NULL) {that there is no check for $limit == 0.
Perhaps pager_query should not fail when the second argument is 0, but an easy check could be added on line 499:
if ($type && variable_get(FAVORITE_NODES_NODE_TYPE . $type, 0)) {should be
if ($limit != 0 && $type && variable_get(FAVORITE_NODES_NODE_TYPE . $type, 0)) {#2
#3
#4
Automatically closed -- issue fixed for 2 weeks with no activity.