Unverified Commit 707d45e4 authored by Sebastian Castro's avatar Sebastian Castro
Browse files

Fix manifest action when no image

parent 4d2bb9c3
...@@ -254,7 +254,7 @@ class APIController extends GoGoController ...@@ -254,7 +254,7 @@ class APIController extends GoGoController
return $this->render('api/api-ui.html.twig', ['options' => $options, 'config' => $config]); return $this->render('api/api-ui.html.twig', ['options' => $options, 'config' => $config]);
} }
public function getManifestAction(DocumentManager $dm) public function getManifestAction(Request $request, DocumentManager $dm)
{ {
$config = $dm->getRepository('App\Document\Configuration')->findConfiguration(); $config = $dm->getRepository('App\Document\Configuration')->findConfiguration();
$img = $config->getFavicon() ? $config->getFavicon() : $config->getLogo(); $img = $config->getFavicon() ? $config->getFavicon() : $config->getLogo();
...@@ -272,8 +272,8 @@ class APIController extends GoGoController ...@@ -272,8 +272,8 @@ class APIController extends GoGoController
} }
} }
if (!$imageData) { if (!$imageData) {
$imgUrl = $this->getRequest()->getUriForPath('/assets/img/default-icon.png'); $imgUrl = $request->getUriForPath('/assets/img/default-icon.png');
if ('dev' == $this->container->getParameter('kernel.environment')) { if ('dev' == $this->getParameter('kernel.environment')) {
$imgUrl = str_replace('index.php/', '', $imgUrl); $imgUrl = str_replace('index.php/', '', $imgUrl);
} }
try { try {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment