Permalink
Browse files

Merge pull request #7 from marijnkampf/master

BUGFIX uncaught exception method 'onmobiledomain' does not exist on 'Security'
  • Loading branch information...
2 parents 4eb9173 + 2ecbb66 commit e33fae225c1c017d009941a11dc10b44597df128 @halkyon halkyon committed Feb 11, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 code/MobileSiteTreeExtension.php
@@ -8,7 +8,7 @@ function MetaTags(&$tags) {
$config = SiteConfig::current_site_config();
// Ensure a canonical link is placed, for semantic correctness and SEO
- if(Controller::has_curr() && Controller::curr()->onMobileDomain() && $config->MobileSiteType == 'RedirectToDomain') {
+ if(Controller::has_curr() && Controller::curr()->hasMethod("onMobileDomain") && Controller::curr()->onMobileDomain() && $config->MobileSiteType == 'RedirectToDomain') {
$oldBaseURL = Director::baseURL();
Director::setbaseURL($config->FullSiteDomain);
$tags .= sprintf('<link rel="canonical" href="%s" />', $this->owner->AbsoluteLink()) . "\n";

0 comments on commit e33fae2

Please sign in to comment.