Merge pull request #1483 from tigrang/debugger-fix

Added case for `unknown` type.

Fixes #3966
This commit is contained in:
Mark Story 2013-08-06 19:39:13 -07:00
commit dc15c78710
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);
} }