I'm getting the following error when using the cvs version of the book.module.
I'm trying to get to http://mydomain.com/dev/?q=node/view/214, which is linked to from http://mydomain.com/dev/?q=book

Fatal error: Only variables can be passed by reference in C:\Program Files\Apache Group\Apache\htdocs\dev\modules\book.module on line 341

By the way, I'm once more excited about how the book module is designed. Being able to dynamically build a reference out of postings is wonderful.

Cheers,
- Joe

Comments

al’s picture

Hmmm... Dries updated book.module here:
Revision: 1.158, Sat May 24 16:26:13 2003
(which is an hour before this bug report was made)

Line 341 after the patch looks like this:
while (($leaf = array_pop($path)) && count($path)) {

Line 341 before the patch looked like this:
array_push($path = book_location($node), $node);

I don't really see where this error message could be coming from and I certainly can't reproduce it.

Could you update to the latest version of CVS book.module and see if you can reproduce it, please, specifying an error message here if so, with a file CVS ID revision number (it's in the book.module file at the top).

joe lombardo’s picture

Ok. I downloaded drupal-cvs and copied the book.module into my module directory, the ID revision number is ($Id: book.module,v 1.158 2003/05/24 16:26:13 dries Exp $). I also removed any nodes of type 'book' from the database and emptied the book table.

Unfortunately, I can still recreate the problem.

Here's the error message:

Fatal error: Only variables can be passed by reference in C:\Program Files\Apache Group\Apache\htdocs\ft-dev\modules\book.module on line 339

Heres line 339:

array_push($path = book_location($node), $node); // path to root node including this one

I noticed that this line is preceeded by the comment:
// no direct child: get next for this level or any parent in this book

Further testing reveals that the error only happens when there aren't any children nodes.

Thanks for your help Al!

- Joe

joe lombardo’s picture

I've upgraded the entire site and the problem is gone. Seems safe to close this as no one else reported having the same problem.

- Joe