The above error happens when I edit the top-level article in one of my books. Sorry I don't have a real patch format for you, but I fixed this error in the function advancedbookblocks_nodeapi by adding a line to initialize the $node_terms as an array. Here is the old code starting at line 553 in Alpha1:

      if (!empty($customized_blocks)) {
        $result = db_query("SELECT tid FROM {term_node} WHERE nid = %d", $bid);
        while ($term = db_fetch_object($result)) {
          $node_terms[] = $term->tid;
        }

and here is the modified code:

      if (!empty($customized_blocks)) {
        $node_terms = array();
        $result = db_query("SELECT tid FROM {term_node} WHERE nid = %d", $bid);
        while ($term = db_fetch_object($result)) {
          $node_terms[] = $term->tid;
        }