Skip to content
Permalink
Browse files

Merge pull request #2676 from lopes-vincent/fix/tlog_forbidden

Fix Tlog on reponse when ConfigQuery is not generated on cache
  • Loading branch information...
lopes-vincent committed Jul 3, 2019
2 parents e24656b + b394f01 commit f1e6c0f6f90585a3585a17a7df83153d001b7a65
Showing with 6 additions and 1 deletion.
  1. +6 −1 core/lib/Thelia/Core/HttpFoundation/Response.php
@@ -14,6 +14,8 @@
use Symfony\Component\HttpFoundation\Response as BaseResponse;
use Thelia\Log\Tlog;
use Thelia\Model\ConfigQuery;
/**
* extends Thelia\Core\HttpFoundation\Response for adding some helpers
@@ -31,7 +33,10 @@ class Response extends BaseResponse
*/
public function sendContent()
{
Tlog::getInstance()->write($this->content);
//ConfigQuery can be not already generated in cache so we must check it
if (class_exists('ConfigQuery')) {
Tlog::getInstance()->write($this->content);
}
parent::sendContent();
}

0 comments on commit f1e6c0f

Please sign in to comment.
You can’t perform that action at this time.