From dae3178ac97a1cc73e4f1af4b4a7d3d4462d7170 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Sat, 1 Sep 2012 14:04:24 +0200 Subject: [PATCH] LSsession::startLStemplate() : added check to verify that smarty's compile dir is writable. --- public_html/includes/class/class.LSsession.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/public_html/includes/class/class.LSsession.php b/public_html/includes/class/class.LSsession.php index e37f8ca1..d7580493 100644 --- a/public_html/includes/class/class.LSsession.php +++ b/public_html/includes/class/class.LSsession.php @@ -133,6 +133,9 @@ class LSsession { $GLOBALS['Smarty'] = new Smarty(); $GLOBALS['Smarty'] -> template_dir = LS_TEMPLATES_DIR; $GLOBALS['Smarty'] -> compile_dir = LS_TMP_DIR; + if ( ! is_writable(LS_TMP_DIR) ) { + die('Smarty compile directory is not writable (dir : '.LS_TMP_DIR.')'); + } if (LSdebug) { $GLOBALS['Smarty'] -> caching = 0;