From bee762e34917845e86be84acd07eb1cc9272abf1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andr=C3=A9=20Lahmann?= <lahmann@ub.uni-leipzig.de>
Date: Fri, 16 Oct 2015 18:03:28 +0200
Subject: [PATCH] * fixes the warning if a cache folder does not

---
 config/application.config.php | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/config/application.config.php b/config/application.config.php
index 2efe44d7c65..0cdb7c948d1 100644
--- a/config/application.config.php
+++ b/config/application.config.php
@@ -22,14 +22,18 @@ if ($localModules = getenv('VUFIND_LOCAL_MODULES')) {
 // Set up cache directory (be sure to keep separate cache for CLI vs. web and
 // to account for potentially variant environment settings):
 $baseDir = ($local = getenv('VUFIND_LOCAL_DIR')) ? $local : 'data';
+$cacheDir = $baseDir . '/cache';
+if (!is_dir($cacheDir)) {
+    mkdir($cacheDir);
+}
 if (PHP_SAPI == 'cli') {
-    $cacheDir = $baseDir . '/cache/cli';
+    $cacheDir .= '/cli';
     if (!is_dir($cacheDir)) {
         mkdir($cacheDir);
     }
     $cacheDir .= '/configs';
 } else {
-    $cacheDir = $baseDir . '/cache/configs';
+    $cacheDir .= '/configs';
 }
 if (!is_dir($cacheDir)) {
     mkdir($cacheDir);
-- 
GitLab