Don't use Pico::getAbsolutePath() for $config['content_dir'], just make sure the trailing slash exists. The config.php in Picos root dir should be interpreted exactly like in Pico 0.9 (the option didn't exist in Pico 0.8), thus the path isn't necessarily relative to Picos root dir
This commit is contained in:
Daniel Rudolf 2015-11-14 16:50:32 +01:00
parent 71076e8eba
commit c0d30d20f8

View file

@ -176,19 +176,11 @@ class PicoDeprecated extends AbstractPicoPlugin
require($this->getRootDir() . 'config.php'); require($this->getRootDir() . 'config.php');
if (is_array($config)) { if (is_array($config)) {
if (array_key_exists('base_url', $config)) { if (isset($config['base_url'])) {
if (!empty($config['base_url'])) { $config['base_url'] = rtrim($config['base_url'], '/') . '/';
$config['base_url'] = rtrim($config['base_url'], '/') . '/';
} else {
unset($config['base_url']);
}
} }
if (array_key_exists('content_dir', $config)) { if (isset($config['content_dir'])) {
if (!empty($config['content_dir'])) { $config['content_dir'] = rtrim($config['content_dir'], '/') . '/';
$config['content_dir'] = $this->getAbsolutePath($config['content_dir']);
} else {
unset($config['content_dir']);
}
} }
$realConfig = $config + $realConfig; $realConfig = $config + $realConfig;