Skip to content
This repository has been archived by the owner on Dec 4, 2023. It is now read-only.

Commit

Permalink
fix(Extension): fix init cookie on response setup (#19)
Browse files Browse the repository at this point in the history
Co-authored-by: David Štrop <[email protected]>
  • Loading branch information
dstrop and David Štrop authored Apr 19, 2023
1 parent 4938f5a commit 644356a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/DI/Extension.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,11 @@ protected function createApplication(ContainerBuilder $builder)
->setAutowired(NetteApplicationHandler::class)
->addSetup('$catchExceptions', [$this->config->catchExceptions])
->addSetup('$errorPresenter', [$this->config->errorPresenter])
->addSetup('$onResponse[] = ?', [
(string)(new Nette\PhpGenerator\Literal(
'function() { Nette\Http\Helpers::initCookie($this->getService(?), $this->getService(?));};',
[$this->prefix('response'), $this->prefix('request')]
))
->addSetup('$onResponse[]', [
new Nette\PhpGenerator\Literal(
'function(): void { Nette\Http\Helpers::initCookie($this->getService(?), $this->getService(?));}',
[$this->prefix('request'), $this->prefix('response')]
)
]);
}

Expand Down

0 comments on commit 644356a

Please sign in to comment.