Fix "Uninitialized string offset: 0 at \/media\/psf\/stable9\/lib\/private\/URLGenerator.php#224"

The URLGenerator doesn't support `` as target for absolute URLs, we need to link to `/` thus.

Regression introduced with 46229a00f3

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
This commit is contained in:
Lukas Reschke 2017-09-06 16:24:49 +02:00 committed by Roeland Jago Douma
parent 9959560649
commit 0bccd5a0d9
No known key found for this signature in database
GPG Key ID: F941078878347C0C
1 changed files with 6 additions and 6 deletions

View File

@ -184,12 +184,12 @@ class LoginController extends Controller {
}
// OpenGraph Support: http://ogp.me/
Util::addHeader('meta', ['property' => "og:title", 'content' => Util::sanitizeHTML($this->defaults->getName())]);
Util::addHeader('meta', ['property' => "og:description", 'content' => Util::sanitizeHTML($this->defaults->getSlogan())]);
Util::addHeader('meta', ['property' => "og:site_name", 'content' => Util::sanitizeHTML($this->defaults->getName())]);
Util::addHeader('meta', ['property' => "og:url", 'content' => $this->urlGenerator->getAbsoluteURL('')]);
Util::addHeader('meta', ['property' => "og:type", 'content' => "website"]);
Util::addHeader('meta', ['property' => "og:image", 'content' => $this->urlGenerator->getAbsoluteURL($this->urlGenerator->imagePath('core','favicon-touch.png'))]);
Util::addHeader('meta', ['property' => 'og:title', 'content' => Util::sanitizeHTML($this->defaults->getName())]);
Util::addHeader('meta', ['property' => 'og:description', 'content' => Util::sanitizeHTML($this->defaults->getSlogan())]);
Util::addHeader('meta', ['property' => 'og:site_name', 'content' => Util::sanitizeHTML($this->defaults->getName())]);
Util::addHeader('meta', ['property' => 'og:url', 'content' => $this->urlGenerator->getAbsoluteURL('/')]);
Util::addHeader('meta', ['property' => 'og:type', 'content' => 'website']);
Util::addHeader('meta', ['property' => 'og:image', 'content' => $this->urlGenerator->getAbsoluteURL($this->urlGenerator->imagePath('core','favicon-touch.png'))]);
return new TemplateResponse(
$this->appName, 'login', $parameters, 'guest'