Skip to content
This repository has been archived by the owner on Nov 21, 2019. It is now read-only.

Bug in code in documentation for MultiModel #42

Open
acorncom opened this issue May 21, 2011 · 0 comments
Open

Bug in code in documentation for MultiModel #42

acorncom opened this issue May 21, 2011 · 0 comments

Comments

@acorncom
Copy link

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!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant