diff --git a/lib/Cake/Test/Case/Utility/DebuggerTest.php b/lib/Cake/Test/Case/Utility/DebuggerTest.php index 99499295ab7..dfb823e8d5b 100644 --- a/lib/Cake/Test/Case/Utility/DebuggerTest.php +++ b/lib/Cake/Test/Case/Utility/DebuggerTest.php @@ -408,6 +408,11 @@ public function testExportVar() { false TEXT; $this->assertTextEquals($expected, $result); + + $file = fopen('php://output', 'w'); + fclose($file); + $result = Debugger::exportVar($file); + $this->assertTextEquals('unknown', $result); } /** diff --git a/lib/Cake/Utility/Debugger.php b/lib/Cake/Utility/Debugger.php index e1b5c2aecf2..865ee422998 100644 --- a/lib/Cake/Utility/Debugger.php +++ b/lib/Cake/Utility/Debugger.php @@ -500,6 +500,8 @@ protected static function _export($var, $depth, $indent) { return strtolower(gettype($var)); case 'null': return 'null'; + case 'unknown': + return 'unknown'; default: return self::_object($var, $depth - 1, $indent + 1); }