Skip to content

Commit 99209dc

Browse files
authored
Update Tree.php
1 parent 3c46cb7 commit 99209dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Utils/Tree.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class Tree
1212
* @return array
1313
* #
1414
*/
15-
public static function toTree($data, $primary = 'id', $parent = 'parent_id', $children = 'children')
15+
public static function toTree($data = [], $primary = 'id', $parent = 'parent_id', $children = 'children')
1616
{
1717
if (!isset($data[0][$parent])) {
1818
return [];

0 commit comments

Comments
 (0)