Instead of directly checking ClassName, check if an instance instead
This commit is contained in:
parent
57bde0bfc3
commit
10f5213192
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue