Needs review
Project:
Advanced Book Blocks
Version:
6.x-2.5
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
16 Mar 2011 at 00:23 UTC
Updated:
26 Aug 2011 at 21:56 UTC
I noticed PHP complaining on pressflow:
WD php: Notice: Undefined property: stdClass::$book in advancedbookblocks_nodeapi() (line 564 of [error]
/path/to/drupal/sites/all/modules/advancedbookblocks/advancedbookblocks.module).and it seems to me that
function advancedbookblocks_nodeapi(&$node, $op) {
$bid = $node->book['bid'];
// doing its thing
}
should make sure that we are on a book node before it does its thing, like so:
function advancedbookblocks_nodeapi(&$node, $op) {
//check to see if node is a book
if (!empty($node->book['bid'])) {
//doing its thing
}
}
I've attached a patch to the point.
| Comment | File | Size | Author |
|---|---|---|---|
| advancedbookblocks.module.patch | 1.03 KB | andrew_mallis |
Comments
Comment #1
andrew_mallis commentedhello?
Comment #2
proindustries commentedRan into same issue. The first hunk of your patch changes line 102, which I don't think is directly related to this issue? Otherwise patch seems to do what's needed.