From c0d30d20f8984e616a3f2359fc9c78f13adaa76c Mon Sep 17 00:00:00 2001 From: Daniel Rudolf Date: Sat, 14 Nov 2015 16:50:32 +0100 Subject: [PATCH] Follow-up to c72ea0e 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 --- plugins/00-PicoDeprecated.php | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/plugins/00-PicoDeprecated.php b/plugins/00-PicoDeprecated.php index a246547..4866b9e 100644 --- a/plugins/00-PicoDeprecated.php +++ b/plugins/00-PicoDeprecated.php @@ -176,19 +176,11 @@ class PicoDeprecated extends AbstractPicoPlugin require($this->getRootDir() . 'config.php'); if (is_array($config)) { - if (array_key_exists('base_url', $config)) { - if (!empty($config['base_url'])) { - $config['base_url'] = rtrim($config['base_url'], '/') . '/'; - } else { - unset($config['base_url']); - } + if (isset($config['base_url'])) { + $config['base_url'] = rtrim($config['base_url'], '/') . '/'; } - if (array_key_exists('content_dir', $config)) { - if (!empty($config['content_dir'])) { - $config['content_dir'] = $this->getAbsolutePath($config['content_dir']); - } else { - unset($config['content_dir']); - } + if (isset($config['content_dir'])) { + $config['content_dir'] = rtrim($config['content_dir'], '/') . '/'; } $realConfig = $config + $realConfig;