Fixed sandbox mode
authorAlexander Ebert <ebert@woltlab.com>
Tue, 24 Apr 2012 18:02:49 +0000 (20:02 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 24 Apr 2012 18:02:49 +0000 (20:02 +0200)
wcfsetup/install/files/lib/system/template/TemplateScriptingCompiler.class.php

index f781b158652dd027cf7f66dc32f36a8a2455f735..87a162e09e0a886a57f122a81d61bafed8c01dcb 100644 (file)
@@ -742,7 +742,7 @@ class TemplateScriptingCompiler {
                        unset($args['append']);
                }
                
-               $sandbox = false;
+               $sandbox = 0;
                if (isset($args['sandbox'])) {
                        $sandbox = $args['sandbox'];
                        unset($args['sandbox']);
@@ -810,7 +810,7 @@ class TemplateScriptingCompiler {
                        $phpCode .= "ob_start();\n";
                }
                
-               $phpCode .= '$this->includeTemplate('.$file.', array('.$argString.'), '.($sandbox ? 1 : 0).', $this->v[\'__PACKAGE_ID\']);'."\n";
+               $phpCode .= '$this->includeTemplate('.$file.', array('.$argString.'), ('.$sandbox.' ? 1 : 0), $this->v[\'__PACKAGE_ID\']);'."\n";
                
                if ($assignVar !== false) {
                        $phpCode .= '$this->'.($append ? 'append' : 'assign').'('.$assignVar.', ob_get_clean());'."\n";