From a6906851fd9939f2e73dbd9c3dde8529e6042714 Mon Sep 17 00:00:00 2001 From: mohrt Date: Mon, 9 Dec 2002 23:51:28 +0000 Subject: [PATCH] add support for var_export() --- Smarty.class.php | 10 +++++++--- libs/Smarty.class.php | 10 +++++++--- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/Smarty.class.php b/Smarty.class.php index edf9cc10..77e594ad 100644 --- a/Smarty.class.php +++ b/Smarty.class.php @@ -1263,9 +1263,13 @@ function _generate_debug_output() { $this->_conf_obj->set_path = $_config_dir; } if($_config_vars = $this->_conf_obj->get($file, $section)) { - $this->_write_file($_compile_file, - '', - true); + + if(function_exists('var_export')) { + $_compile_data = ''; + } else { + $_compile_data = ''; + } + $this->_write_file($_compile_file, $_compile_data, true); touch($_compile_file,filemtime($_file_path)); } } diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index edf9cc10..77e594ad 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -1263,9 +1263,13 @@ function _generate_debug_output() { $this->_conf_obj->set_path = $_config_dir; } if($_config_vars = $this->_conf_obj->get($file, $section)) { - $this->_write_file($_compile_file, - '', - true); + + if(function_exists('var_export')) { + $_compile_data = ''; + } else { + $_compile_data = ''; + } + $this->_write_file($_compile_file, $_compile_data, true); touch($_compile_file,filemtime($_file_path)); } }