YiiMongoDbSuite icon indicating copy to clipboard operation
YiiMongoDbSuite copied to clipboard

Bug in code in documentation for MultiModel

Open acorncom opened this issue 14 years ago • 0 comments

Just copied/pasted your code in to get started from this page:

http://canni.github.com/YiiMongoDbSuite/xhtml/special.multimodel.html

In the code example for NormalClient/BusinessClient, the beforeSave function needs a semi-colon at the end:

public function beforeSave() { if(parent::beforeSave()) { $this->type = self::NORMAL_CLIENT; return true; } else return false }

needs to be: public function beforeSave() { if(parent::beforeSave()) { $this->type = self::NORMAL_CLIENT; return true; } else return false; // <-- change made here }

Thanks for all your work on this!

acorncom avatar May 21 '11 18:05 acorncom