Skip to content

Commit

Permalink
Configurator: added wwwDir, typos
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed May 30, 2011
1 parent fbdc311 commit fcae361
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Nette/common/Configurator.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public function __construct($containerClass = 'Nette\DI\Container')
}

$this->container->params = new ArrayHash;
defined('WWW_DIR') && $this->container->params['wwwDir'] = realpath(WWW_DIR);
defined('APP_DIR') && $this->container->params['appDir'] = realpath(APP_DIR);
defined('LIBS_DIR') && $this->container->params['libsDir'] = realpath(LIBS_DIR);
defined('TEMP_DIR') && $this->container->params['tempDir'] = realpath(TEMP_DIR);
Expand Down Expand Up @@ -87,7 +88,7 @@ public function loadConfig($file, $section = NULL)
}
}

$cache = new Cache($container->templateCacheStorage, __CLASS__);
$cache = new Cache($container->templateCacheStorage, 'Nette.Configurator');
$cacheKey = array((array) $container->params, $file, $section);
$cached = $cache->load($cacheKey);
if ($cached) {
Expand Down Expand Up @@ -118,8 +119,7 @@ public function loadConfig($file, $section = NULL)
} catch (Nette\InvalidArgumentException $e) {}
}
if ($old === $config['variables']) {
throw new InvalidStateException("Circular reference detected for variables: "
. implode(', ', array_keys($old)) . ".");
throw new InvalidStateException("Unable to expand variables: " . implode(', ', array_keys($old)) . ".");
}
}
unset($config['variables']);
Expand Down

0 comments on commit fcae361

Please sign in to comment.