add support for var_export()

This commit is contained in:
mohrt
2002-12-09 23:51:28 +00:00
parent 61987444e8
commit a6906851fd
2 changed files with 14 additions and 6 deletions

View File

@@ -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));
} }
} }

View File

@@ -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));
} }
} }