From 7f086b678f95509d080486e46f683595be591727 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sun, 27 May 2012 12:33:51 +0100 Subject: improved earlier change for paths error messages to not produce any notices --- inc/init.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'inc') diff --git a/inc/init.php b/inc/init.php index 923bda352..403fbe4ab 100644 --- a/inc/init.php +++ b/inc/init.php @@ -233,10 +233,8 @@ function init_paths(){ 'lockdir' => 'locks', 'tmpdir' => 'tmp'); - foreach($paths as $c => $p){ - $path = $conf[$c]; - if(empty($path)) - $path = $conf['savedir'].'/'.$p; + foreach($paths as $c => $p) { + $path = empty($conf[$c]) ? $conf['savedir'].'/'.$p : $conf[$c]; $conf[$c] = init_path($path); if(empty($conf[$c])) nice_die("The $c ('$p') at $path is not found, isn't accessible or writable. @@ -310,7 +308,7 @@ function init_files(){ * Returns absolute path * * This tries the given path first, then checks in DOKU_INC. - * Check for accessability on directories as well. + * Check for accessibility on directories as well. * * @author Andreas Gohr */ -- cgit v1.2.3