foreach error when drawing empty queue
ryan_courtnage - June 9, 2009 - 15:52
| Project: | Nodequeue |
| Version: | 6.x-2.3 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Description
<?php
print nodequeue_node_titles($subqueue_id);
?>Doing this for a queue that is empty will result in a foreach error:
warning: Invalid argument supplied for foreach() in <path>/nodequeue.module on line 2517.nodequeue_view_nodes() should either ensure that $nodes is an array, or nodequeue_load_nodes() should always return an array.

#1
Good point. would you like to submit a patch for this?
#2
Here you go...
#3
Marking as needs review.
#4
Committed to Drupal 5 and 6 branches.
Thanks!
#5
Automatically closed -- issue fixed for 2 weeks with no activity.