Added case for unknown type. Fixes #3966

This commit is contained in:
Tigran Gabrielyan 2013-08-06 14:14:41 -07:00
parent c01aacf72d
commit 2150e8dce5
2 changed files with 7 additions and 0 deletions

View file

@ -408,6 +408,11 @@ TEXT;
false false
TEXT; TEXT;
$this->assertTextEquals($expected, $result); $this->assertTextEquals($expected, $result);
$file = fopen('php://output', 'w');
fclose($file);
$result = Debugger::exportVar($file);
$this->assertTextEquals('unknown', $result);
} }
/** /**

View file

@ -500,6 +500,8 @@ class Debugger {
return strtolower(gettype($var)); return strtolower(gettype($var));
case 'null': case 'null':
return 'null'; return 'null';
case 'unknown':
return 'unknown';
default: default:
return self::_object($var, $depth - 1, $indent + 1); return self::_object($var, $depth - 1, $indent + 1);
} }