We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 99209dc commit 2fda852Copy full SHA for 2fda852
src/Utils/Tree.php
@@ -14,7 +14,7 @@ class Tree
14
*/
15
public static function toTree($data = [], $primary = 'id', $parent = 'parent_id', $children = 'children')
16
{
17
- if (!isset($data[0][$parent])) {
+ if (count($data) === 0) {
18
return [];
19
}
20
0 commit comments