Merge pull request #6682 from nupplaphil/dfactory_fix

Bugfix App
This commit is contained in:
Hypolite Petovan 2019-02-17 20:57:09 -05:00 committed by GitHub
commit bc48274c40
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View file

@ -12,6 +12,6 @@ if (!file_exists(__DIR__ . '/vendor/autoload.php')) {
require __DIR__ . '/vendor/autoload.php'; require __DIR__ . '/vendor/autoload.php';
$a = Factory\DependencyFactory::setUp('index', __DIR__, true); $a = Factory\DependencyFactory::setUp('index', __DIR__, false);
$a->runFrontend(); $a->runFrontend();

View file

@ -214,18 +214,18 @@ class App
*/ */
public function __construct(Configuration $config, LoggerInterface $logger, Profiler $profiler, $isBackend = true) public function __construct(Configuration $config, LoggerInterface $logger, Profiler $profiler, $isBackend = true)
{ {
BaseObject::setApp($this);
$this->logger = $logger; $this->logger = $logger;
$this->config = $config; $this->config = $config;
$this->profiler = $profiler; $this->profiler = $profiler;
$this->basePath = $this->config->get('system', 'basepath'); $this->basePath = $this->config->getCache()->get('system', 'basepath');
if (!Core\System::isDirectoryUsable($this->basePath, false)) { if (!Core\System::isDirectoryUsable($this->basePath, false)) {
throw new Exception('Basepath ' . $this->basePath . ' isn\'t usable.'); throw new Exception('Basepath \'' . $this->basePath . '\' isn\'t usable.');
} }
$this->basePath = rtrim($this->basePath, DIRECTORY_SEPARATOR); $this->basePath = rtrim($this->basePath, DIRECTORY_SEPARATOR);
BaseObject::setApp($this);
$this->checkBackend($isBackend); $this->checkBackend($isBackend);
$this->checkFriendicaApp(); $this->checkFriendicaApp();