The Yii Book

Errata

Errors do happen. As they are caught, they'll be corrected in the next update (this is another benefit of self-publishing an e-book), but in the meantime, you can find them listed here.

The first edition of the book (for Yii 1) is now in maintenance mode, which means new releases will occur rarely, and only for significant problems. Almost all of my energies will go towards the second edition of the book (for Yii 2).

If you catch an error in the book, you can submit that via the feedback page. Thanks!

ChapterSectionVersionError
5, "Working with Models""Validation Scenarios"1.3The identification of the validation scenario needs to be written as an array: $model = new User(['scenario' => 'register']);.
5, "Working with Models""Putting It All Together"1.3The User model behaviors example is missing the return keyword.
5, "Working with Models""Putting It All Together"1.3The User class extends yii\db\ActiveRecord, not CActiveRecord.
7, "Working with Controllers""Showing Static Pages"1.5The reference to protected/views/site/pages/company/board.php should just be views/site/pages/company/board.php.
8, "Working with Databases""Using Database Access Objects"1.5There are a few examples where Yii::app() should read Yii::$app.
10, "Maintaining State""Working with Flash Messages"1.5The code Yii::$app()->session->getAllFlashes() should read Yii::$app->session->getAllFlashes().
11, "User Authentication and Authorization""Authentication Options"1.5The code $model = new User('login']); should read $model = new User(['scenario' => 'login']);.