diff options
author | Christian Weber | 2009-08-26 13:37:03 +0000 |
---|---|---|
committer | Christian Weber | 2009-08-26 13:37:03 +0000 |
commit | 4c4357320f50420edd0bbbdbb8449b5ee6f8d824 (patch) | |
tree | 75c2ded548ff3207908575cda03fdc74b046f536 | |
parent | ea96870667fcd96ca5f7f7b197924c581cc03487 (diff) | |
download | itools-4c4357320f50420edd0bbbdbb8449b5ee6f8d824.tar.gz itools-4c4357320f50420edd0bbbdbb8449b5ee6f8d824.tar.bz2 itools-4c4357320f50420edd0bbbdbb8449b5ee6f8d824.zip |
avoid calling var_export() on $GLOBALS (infinite recursion crash)
-rw-r--r-- | it_debug.class | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/it_debug.class b/it_debug.class index e1766f3..d8f45cf 100644 --- a/it_debug.class +++ b/it_debug.class @@ -129,7 +129,7 @@ function dump($args) foreach ($args as $arg) { $var = array_shift($argnames); - $item = gettype($arg) == 'resource' || is_a($arg, "SimpleXMLElement") ? trim(print_r($arg, true)) : trim(var_export($arg, true)); + $item = gettype($arg) == 'resource' || is_array($arg) && isset($arg['GLOBALS']) || is_a($arg, "SimpleXMLElement") ? trim(print_r($arg, true)) : trim(var_export($arg, true)); # Replace PHP 5 var_export object representation by old style while (preg_match("#(.*\b)(\w+)::__set_state\(array\(([^()]+)\)\)(.*)#s", $item, $regs)) |