diff options
author | redmatrix <mike@macgirvin.com> | 2016-08-28 22:24:27 -0700 |
---|---|---|
committer | redmatrix <mike@macgirvin.com> | 2016-08-28 22:24:27 -0700 |
commit | 6b4cfe4f180a10e3008356c3a4590ad313fa88dd (patch) | |
tree | 399e9317856e0dee4792b6787d481967cbe56bf6 /Zotlabs/Render/SmartyTemplate.php | |
parent | 810d9fefd9778445994d1b88f18996193005f4c2 (diff) | |
download | volse-hubzilla-6b4cfe4f180a10e3008356c3a4590ad313fa88dd.tar.gz volse-hubzilla-6b4cfe4f180a10e3008356c3a4590ad313fa88dd.tar.bz2 volse-hubzilla-6b4cfe4f180a10e3008356c3a4590ad313fa88dd.zip |
Before throwing a 'smarty3 dir does not exist' fatal error, try and create it. We did try and create it during install, but the template processor is initalised long before we get to that code (and throws that ugly error).
Diffstat (limited to 'Zotlabs/Render/SmartyTemplate.php')
-rwxr-xr-x | Zotlabs/Render/SmartyTemplate.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Zotlabs/Render/SmartyTemplate.php b/Zotlabs/Render/SmartyTemplate.php index b7e68c1bc..7abe0731c 100755 --- a/Zotlabs/Render/SmartyTemplate.php +++ b/Zotlabs/Render/SmartyTemplate.php @@ -15,7 +15,10 @@ class SmartyTemplate implements TemplateEngine { ? \App::$config['system']['smarty3_folder'] : ''); if (!$basecompiledir) $basecompiledir = str_replace('Zotlabs','',dirname(__dir__)) . "/" . TEMPLATE_BUILD_PATH; if (!is_dir($basecompiledir)) { - echo "<b>ERROR:</b> folder <tt>$basecompiledir</tt> does not exist."; killme(); + @os_mkdir(TEMPLATE_BUILD_PATH, STORAGE_DEFAULT_PERMISSIONS, true); + if (!is_dir($basecompiledir)) { + echo "<b>ERROR:</b> folder <tt>$basecompiledir</tt> does not exist."; killme(); + } } if(!is_writable($basecompiledir)){ echo "<b>ERROR:</b> folder <tt>$basecompiledir</tt> must be writable by webserver."; killme(); |