Chapter 2. Writing a Module, Page 20
Wed, 01/07/2009 - 11:41am — jvandyk
Location on the page:
Second line
Chapter:
2. Writing a Module
Error:
if (!in_array($node->type, $types_to_annotate)) {
Correction:
if (!in_array($node->type, $types_to_annotate, TRUE)) {
Description of the Error:
Also on page 26, middle of page.
Strict mode for in_array() must be used or the if will fail and thus the annotation form would be displayed on nodes of all types, not just the types selected in Home / Administer / Node annotation. [Fixed in downloadable code.]
