Merge pull request #7338 from creative-commoners/pulls/4.0/default-array-data-value

MINOR Add default value to ArrayData constructor
This commit is contained in:
Damian Mooyman 2017-09-05 10:58:42 +12:00 committed by GitHub
commit 3088a76816

View File

@ -29,7 +29,7 @@ class ArrayData extends ViewableData
* @param object|array $value An associative array, or an object with simple properties.
* Converts object properties to keys of an associative array.
*/
public function __construct($value)
public function __construct($value = [])
{
if (is_object($value)) {
$this->array = get_object_vars($value);