Errata (First Edition)

This page lists the errors found in the first edition of the book.

Chapter 10. The Form API, Page 180

Location on the page: 
top sentence
Error: 

Do not confuse type = '#value' and #value = 123.

Correction: 

Do not confuse '#type' => 'value' and '#value' => 123.

Description of the Error: 

The #type property is missing its #. The array => syntax should be used (instead of =) for setting key/value pairs. The value the #type property is being set to should not have a # preceding it.

Chapter 10. The Form API, Page 181

Location on the page: 
top code sample
Error: 

$form['weight'] = array('#type' => 'weight',

Correction: 

$form['weight'] = array(
'#type' => 'weight',

Description of the Error: 

For consistency purposes and readability the property setting should start on the following line as it does elsewhere throughout the book.

Chapter 11. Manipulating User Input: The Filter System, Page 190

Location on the page: 
code listing of creativejuice.info
Error: 

version = $Name$

Correction: 

version = "$Name$"

Description of the Error: 

forgotten quotes

[And note that using version at all is now discouraged. -JV]

Chapter 12. Searching and Indexing Content, Page 200

Location on the page: 
pathfinder.info listing
Error: 

omitted dependencies

Correction: 

dependencies = search path

Description of the Error: 

The module pathfinder.module depends on search.module and path.module (as stated in the second paragraph of p201). The .info file should reflect that

Chapter 12. Searching and Indexing Content, Page 200

Location on the page: 
Listing 12-3
Error: 

Missing break; statement before case 'search':.

Chapter 12. Searching and Indexing Content, Page 201

Location on the page: 
Top
Error: 

'link'=> url("admin/path/edit/$path->pid"));

Correction: 

'link'=> url("admin/build/path/edit/$path->pid"));

Description of the Error: 

Wrong link. Word /build in the path is missing.

Chapter 12. Searching and Indexing Content, Page 202

Location on the page: 
Line 10
Error: 

Missing break; statement before case 'search':.

Chapter 16. Sessions, Page 253

Location on the page: 
Section "What Are Sessions?", 1st paragraph
Error: 

Note that the name of the session cookie is PHPSESSID only in Drupal 5.0 and 5.1. A new cookie naming convention was introduced in Drupal 5.2 - see http://www.drupalbook.com/node/152 for details.

Chapter 16. Sessions, Page 254

Location on the page: 
paragraph before header "Session-Related Settings", end of second line
Error: 

session.gc.maxlifetime

Correction: 

session.gc_maxlifetime

Description of the Error: 

typo

Chapter 16. Sessions, Page 254

Location on the page: 
Middle of page - "Caution"
Error: 

See http://www.drupalbook.com/node/153. The error is identical.

The Drupal 5 version of sess_write() is at http://api.drupal.org/api/function/sess_write/5.