The Symfony\Component\HttpFoundation\BinaryFileResponse(); on default instantiation has a null content type, this bundle intercepts those files and tries to inject the tag manager into the file, correctly Symfony does not allow this and throws a 500 error:
Uncaught PHP Exception LogicException: "The content cannot be set on a BinaryFileResponse instance."
Maybe the logic here could be reviewed to not try to inject when the content type is null?
// only append to HTML responses
if (!in_array($event->getResponse()->headers->get('content-type'), array('text/html', null))) {
return false;
}
The
Symfony\Component\HttpFoundation\BinaryFileResponse();
on default instantiation has a null content type, this bundle intercepts those files and tries to inject the tag manager into the file, correctly Symfony does not allow this and throws a 500 error:Maybe the logic here could be reviewed to not try to inject when the content type is null?