Instead of directly checking ClassName, check if an instance instead

This commit is contained in:
Sean Harvey 2007-12-20 03:26:20 +00:00
parent 57bde0bfc3
commit 10f5213192
1 changed files with 1 additions and 1 deletions

View File

@ -9,7 +9,7 @@ class NewsletterSignupForm extends Form {
*/
function get_group_code() {
if($controller = $this->controller) {
if($controller->ClassName == 'BlogHolder') {
if($controller instanceof BlogHolder) {
if($controller->Newsletter()) {
return $controller->Newsletter()->Group()->Code;
}