summaryrefslogtreecommitdiff
path: root/it_debug.class
diff options
context:
space:
mode:
Diffstat (limited to 'it_debug.class')
-rw-r--r--it_debug.class6
1 files changed, 6 insertions, 0 deletions
diff --git a/it_debug.class b/it_debug.class
index 4c5af95..359d703 100644
--- a/it_debug.class
+++ b/it_debug.class
@@ -122,6 +122,12 @@ static function dump($args)
foreach ($args as $arg)
{
$var = array_shift($argnames);
+ if (is_a($arg, 'generator')) {
+ $origarg = $arg;
+ $arg = array();
+ foreach ($origarg as $a)
+ $arg[] = $a;
+ }
$item = gettype($arg) == 'resource' || is_array($arg) && isset($arg['GLOBALS']) || is_object($arg) && is_a($arg, "SimpleXMLElement") ? trim(print_r($arg, true)) : trim(var_export($arg, true));
# Replace PHP 5 var_export object representation by old style