[VarDumper] fix truncating big arrays
This commit is contained in:
parent
f4a1885b8d
commit
a8b986e35e
@ -247,7 +247,7 @@ class VarCloner extends AbstractCloner
|
||||
$stub->position = $len++;
|
||||
} elseif ($pos < $maxItems) {
|
||||
if ($maxItems < $pos += \count($a)) {
|
||||
$a = \array_slice($a, 0, $maxItems - $pos);
|
||||
$a = \array_slice($a, 0, $maxItems - $pos, true);
|
||||
if ($stub->cut >= 0) {
|
||||
$stub->cut += $pos - $maxItems;
|
||||
}
|
||||
|
@ -162,7 +162,7 @@ EOTXT;
|
||||
'Level 3 Item 3',
|
||||
],
|
||||
[
|
||||
'Level 3 Item 4',
|
||||
999 => 'Level 3 Item 4',
|
||||
'Level 3 Item 5',
|
||||
'Level 3 Item 6',
|
||||
],
|
||||
@ -242,7 +242,7 @@ Symfony\Component\VarDumper\Cloner\Data Object
|
||||
[1] => Array
|
||||
(
|
||||
[0] => 2
|
||||
[2] => 7
|
||||
[1] => 7
|
||||
)
|
||||
|
||||
[2] => Array
|
||||
@ -299,7 +299,7 @@ Symfony\Component\VarDumper\Cloner\Data Object
|
||||
|
||||
[7] => Array
|
||||
(
|
||||
[0] => Level 3 Item 4
|
||||
[999] => Level 3 Item 4
|
||||
)
|
||||
|
||||
)
|
||||
|
Reference in New Issue
Block a user