Skip to content

Commit

Permalink
Parse environment variables from baseUrl
Browse files Browse the repository at this point in the history
This fixes an issue in 3.1 when you use environment variables to set a site's base URL
  • Loading branch information
Rias authored Jan 20, 2019
1 parent 148c726 commit ede40d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/fields/SeoField.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public function getInputHtml ($value, ElementInterface $element = null): string
if ($craft->sites->currentSite->baseUrl) {
preg_match(
"((http?s?:\/\/)?(www.)?(.*)\/)",
$craft->sites->currentSite->baseUrl,
\Craft::parseEnv($craft->sites->currentSite->baseUrl),
$socialPreviewUrl
);
$socialPreviewUrl = $socialPreviewUrl[3];
Expand Down Expand Up @@ -262,4 +262,4 @@ public function getTableAttributeHtml (
}
}

}
}

0 comments on commit ede40d9

Please sign in to comment.