mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 18:34:27 +02:00
add support for var_export()
This commit is contained in:
@@ -1263,9 +1263,13 @@ function _generate_debug_output() {
|
|||||||
$this->_conf_obj->set_path = $_config_dir;
|
$this->_conf_obj->set_path = $_config_dir;
|
||||||
}
|
}
|
||||||
if($_config_vars = $this->_conf_obj->get($file, $section)) {
|
if($_config_vars = $this->_conf_obj->get($file, $section)) {
|
||||||
$this->_write_file($_compile_file,
|
|
||||||
'<?php $_config_vars = unserialize(\'' . str_replace('\'','\\\'', serialize($_config_vars)) . '\'); ?>',
|
if(function_exists('var_export')) {
|
||||||
true);
|
$_compile_data = '<?php $_config_vars = ' . var_export($_config_vars, true) . '; ?>';
|
||||||
|
} else {
|
||||||
|
$_compile_data = '<?php $_config_vars = unserialize(\'' . str_replace('\'','\\\'', serialize($_config_vars)) . '\'); ?>';
|
||||||
|
}
|
||||||
|
$this->_write_file($_compile_file, $_compile_data, true);
|
||||||
touch($_compile_file,filemtime($_file_path));
|
touch($_compile_file,filemtime($_file_path));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1263,9 +1263,13 @@ function _generate_debug_output() {
|
|||||||
$this->_conf_obj->set_path = $_config_dir;
|
$this->_conf_obj->set_path = $_config_dir;
|
||||||
}
|
}
|
||||||
if($_config_vars = $this->_conf_obj->get($file, $section)) {
|
if($_config_vars = $this->_conf_obj->get($file, $section)) {
|
||||||
$this->_write_file($_compile_file,
|
|
||||||
'<?php $_config_vars = unserialize(\'' . str_replace('\'','\\\'', serialize($_config_vars)) . '\'); ?>',
|
if(function_exists('var_export')) {
|
||||||
true);
|
$_compile_data = '<?php $_config_vars = ' . var_export($_config_vars, true) . '; ?>';
|
||||||
|
} else {
|
||||||
|
$_compile_data = '<?php $_config_vars = unserialize(\'' . str_replace('\'','\\\'', serialize($_config_vars)) . '\'); ?>';
|
||||||
|
}
|
||||||
|
$this->_write_file($_compile_file, $_compile_data, true);
|
||||||
touch($_compile_file,filemtime($_file_path));
|
touch($_compile_file,filemtime($_file_path));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user