Skip to content

Commit e3d80c8

Browse files
committed
do not cast the key to int
1 parent 7d0b79c commit e3d80c8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/app/Library/CrudPanel/Traits/Reorder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ public function updateTreeOrder($request)
2929
$reorderItems = collect($request)->filter(function ($item) use ($itemKeys) {
3030
return $item['item_id'] !== '' && $item['item_id'] !== null && $itemKeys->contains($item['item_id']);
3131
})->map(function ($item) use ($primaryKey) {
32-
$item[$primaryKey] = (int) $item['item_id'];
33-
$item['parent_id'] = empty($item['parent_id']) ? null : (int) $item['parent_id'];
32+
$item[$primaryKey] = $item['item_id'];
33+
$item['parent_id'] = empty($item['parent_id']) ? null : $item['parent_id'];
3434
$item['depth'] = empty($item['depth']) ? null : (int) $item['depth'];
3535
$item['lft'] = empty($item['left']) ? null : (int) $item['left'];
3636
$item['rgt'] = empty($item['right']) ? null : (int) $item['right'];

0 commit comments

Comments
 (0)