Index: book_manager.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/book_manager/book_manager.module,v
retrieving revision 1.1.2.14.2.30
diff -u -p -r1.1.2.14.2.30 book_manager.module
--- book_manager.module	22 Dec 2010 22:54:13 -0000	1.1.2.14.2.30
+++ book_manager.module	4 Jan 2011 21:33:29 -0000
@@ -639,16 +639,19 @@ function _book_manager_nodes_to_books($p
 function _book_manager_limit_books(&$bid, $node) {
   $nidstobids = _book_manager_nodes_to_books(TRUE);
   $addtobooks = user_access('add content to books');
-  foreach ($bid['#options'] as $nid => $title) {
-    if ((_book_manager_is_in_personal_book($node) && !_book_manager_author_matches($nid, $node->uid)) || // node is in a personal book and node->author does not match current nid author
-        (!user_access('add content to books') && !_book_manager_author_matches($nid)) ||                            // user does not have permission to add content from other authors
-        (in_array($nid, $nidstobids) && !_book_manager_author_matches($nid, $node->uid))) {                         // node in question is in a personal book and the author does not match the current node author
-      // Leave <none> in the list; otherwise, remove the offending node
-      if ($nid != 0) {
-        unset($bid['#options'][$nid]);
+  if (!empty($bid['#options'])) {
+    foreach ($bid['#options'] as $nid => $title) {
+      if ((_book_manager_is_in_personal_book($node) && !_book_manager_author_matches($nid, $node->uid)) || // node is in a personal book and node->author does not match current nid author
+          (!user_access('add content to books') && !_book_manager_author_matches($nid)) ||                            // user does not have permission to add content from other authors
+          (in_array($nid, $nidstobids) && !_book_manager_author_matches($nid, $node->uid))) {                         // node in question is in a personal book and the author does not match the current node author
+        // Leave <none> in the list; otherwise, remove the offending node
+        if ($nid != 0) {
+          unset($bid['#options'][$nid]);
+        }
       }
     }
   }
+  
   $nid = isset($node->nid) ? $node->nid : 'new';
   if (!user_access('create new books') && user_access('create personal books')  && ($nid == 'new' || ($nid != $node->book['original_bid']))) {
     $bid['#options'] = array($nid  => '<'. t('create new book') .'>') + $bid['#options'];
