Skip to content

Commit dd5bc63

Browse files
committed
Dumper: store files when output is multiline
1 parent 0660dbc commit dd5bc63

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Framework/Dumper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ public static function dumpException(\Throwable $e): string
265265
$actual = $e->actual;
266266

267267
if (is_object($expected) || is_array($expected) || (is_string($expected) && strlen($expected) > self::$maxLength)
268-
|| is_object($actual) || is_array($actual) || (is_string($actual) && strlen($actual) > self::$maxLength)
268+
|| is_object($actual) || is_array($actual) || (is_string($actual) && (strlen($actual) > self::$maxLength || preg_match('#[\x00-\x1F]#', $actual)))
269269
) {
270270
$args = isset($_SERVER['argv'][1])
271271
? '.[' . implode(' ', preg_replace(['#^-*([^|]+).*#i', '#[^=a-z0-9. -]+#i'], ['$1', '-'], array_slice($_SERVER['argv'], 1))) . ']'

0 commit comments

Comments
 (0)