Skip to content

Commit ceac42f

Browse files
committed
[HttpKernel] Initialize DataCollector data as array
This fixes a DumpDataCollector error when the debug panel is opened without collected data: ContextErrorException: Warning: Invalid argument supplied for foreach() - in vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/DumpDataCollector.php at line 165
1 parent 1422e9a commit ceac42f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

DataCollector/DataCollector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
*/
2424
abstract class DataCollector implements DataCollectorInterface, \Serializable
2525
{
26-
protected $data;
26+
protected $data = array();
2727

2828
/**
2929
* @var ValueExporter

0 commit comments

Comments
 (0)