summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUrban Müller2013-06-28 17:25:12 +0000
committerUrban Müller2013-06-28 17:25:12 +0000
commitd95ab5019c2fb2f8a372ae858cbcaaa262351b36 (patch)
tree8e150146c69d9762ef703e21ead7526ea56a4e47
parent54abf987f6d5a8a7a3225729e47d9c5ca5281b9b (diff)
downloaditools-d95ab5019c2fb2f8a372ae858cbcaaa262351b36.tar.gz
itools-d95ab5019c2fb2f8a372ae858cbcaaa262351b36.tar.bz2
itools-d95ab5019c2fb2f8a372ae858cbcaaa262351b36.zip
handle generators in ED()
-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