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
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();
$img = $config->getFavicon() ? $config->getFavicon() : $config->getLogo();
......@@ -272,8 +272,8 @@ class APIController extends GoGoController
}
}
if (!$imageData) {
$imgUrl = $this->getRequest()->getUriForPath('/assets/img/default-icon.png');
if ('dev' == $this->container->getParameter('kernel.environment')) {
$imgUrl = $request->getUriForPath('/assets/img/default-icon.png');
if ('dev' == $this->getParameter('kernel.environment')) {
$imgUrl = str_replace('index.php/', '', $imgUrl);
}
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