]> git.mxchange.org Git - friendica.git/commitdiff
Overwrite constructor of Memory session handling so no session ini-setting in backend...
authornupplaPhil <admin@philipp.info>
Tue, 10 Dec 2019 22:35:16 +0000 (23:35 +0100)
committernupplaPhil <admin@philipp.info>
Tue, 10 Dec 2019 22:35:16 +0000 (23:35 +0100)
src/Core/Session/Memory.php
tests/include/ApiTest.php

index b39234db23ea225957d7578560d79a668cda8e43..f8d02b55389596ba683870ecb0824cb899590cc1 100644 (file)
@@ -2,6 +2,9 @@
 
 namespace Friendica\Core\Session;
 
+use Friendica\Core\Config\Configuration;
+use Friendica\Model\User\Cookie;
+
 /**
  * Usable for backend processes (daemon/worker) and testing
  *
@@ -9,6 +12,11 @@ namespace Friendica\Core\Session;
  */
 final class Memory extends Native
 {
+       public function __construct(Configuration $config, Cookie $cookie)
+       {
+               $this->cookie = $cookie;
+       }
+
        public function start()
        {
                // Backward compatibility until all Session variables are replaced
index 63e8d23453c90f4152da0c178ad4b86dd5354535..ef46a4d447c729c4aa17f4664c6d2fab9f63e227 100644 (file)
@@ -62,7 +62,7 @@ class ApiTest extends DatabaseTest
                $this->dice = (new Dice())
                        ->addRules(include __DIR__ . '/../../static/dependencies.config.php')
                        ->addRule(Database::class, ['instanceOf' => StaticDatabase::class, 'shared' => true])
-                       ->addRule(ISession::class, ['instanceOf' => Session\Memory::class, 'shared' => true]);
+                       ->addRule(ISession::class, ['instanceOf' => Session\Memory::class, 'shared' => true, 'call' => null]);
                BaseObject::setDependencyInjection($this->dice);
 
                /** @var Database $dba */