mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
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
Block a user