Refactor dependency for $_COOKIE

This commit is contained in:
Art4 2024-12-23 14:23:58 +00:00
parent 48bd6b2f81
commit 31a731deb7

View file

@ -39,7 +39,7 @@ use Friendica\Util;
/** /**
* @param string $basepath The base path of the Friendica installation without trailing slash * @param string $basepath The base path of the Friendica installation without trailing slash
*/ */
return (function(string $basepath, array $getVars, array $serverVars): array { return (function(string $basepath, array $getVars, array $serverVars, array $cookieVars): array {
return [ return [
'*' => [ '*' => [
// marks all class result as shared for other creations, so there's just // marks all class result as shared for other creations, so there's just
@ -257,7 +257,7 @@ return (function(string $basepath, array $getVars, array $serverVars): array {
], ],
Cookie::class => [ Cookie::class => [
'constructParams' => [ 'constructParams' => [
$_COOKIE $cookieVars,
], ],
], ],
ICanWriteToStorage::class => [ ICanWriteToStorage::class => [
@ -311,5 +311,6 @@ return (function(string $basepath, array $getVars, array $serverVars): array {
})( })(
dirname(__FILE__, 2), dirname(__FILE__, 2),
$_GET, $_GET,
$_SERVER $_SERVER,
$_COOKIE
); );