I found that the following error is displayed when attempting to rename the top node of a book if the book had no taxonomy terms associated with it.

warning: array_intersect() [function.array-intersect]: Argument #1 is not an array in .../sites/all/modules/advancedbookblocks/advancedbookblocks.module on line 563.

Initializing an empty array seems to have solved the problem for me.

550a551
>         $node_terms = array();

Kurrt

Comments

idcm’s picture

Kurrt, I am not used to the 550a551 notation. I assume it means where to insert. Would you mind confirming that I have the correct insert location. This line: if (!empty($customized_blocks)) { is now line 552.

function advancedbookblocks_nodeapi(&$node, $op) {
 
  if ($op == 'update' || $op == 'insert' ) {
    $bid = $node->book['bid'];
   
    if (!empty($bid) && ($bid == $node->nid)) {
      $result = db_query("SELECT delta FROM {adv_book_block} WHERE custom = 1");
      while ($block = db_fetch_object($result)) {
        $customized_blocks[] = $block->delta;
      }
      $node_terms = array();
      if (!empty($customized_blocks)) {

thanks

idcm’s picture

I inserted what Kurt suggested and so far so good.
c

yarrait’s picture

Hello,

I also had same issue .. above trick of initializing array worked fine for me.

Thanks