File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -294,21 +294,21 @@ public function reorderMenuItems(array $orderedItems): void
294294
295295 // Validate that all items belong to this menu
296296 $ itemIds = array_column ($ orderedItems , 'id ' );
297-
297+
298298 // Filter out null IDs
299299 $ itemIds = array_filter ($ itemIds , function ($ id ) {
300300 return $ id !== null && is_numeric ($ id );
301301 });
302-
302+
303303 if (empty ($ itemIds )) {
304304 Notification::make ()
305305 ->title (flexiblePagesTrans ('menu_items.errors.no_items_to_reorder ' ))
306306 ->danger ()
307307 ->send ();
308-
308+
309309 return ;
310310 }
311-
311+
312312 $ validItems = $ menuItemModel ::whereIn ('id ' , $ itemIds )
313313 ->where ('menu_id ' , $ this ->record ->id )
314314 ->count ();
@@ -418,7 +418,7 @@ protected function processNestedSetReorder(array $orderedItems): void
418418
419419 // Process items with parents
420420 foreach ($ itemsByParent as $ parentId => $ children ) {
421- if ($ parentId !== null ) {
421+ if ($ parentId ) {
422422 $ parent = $ this ->getMenuItemSecurely ($ parentId );
423423 if ($ parent ) {
424424 // Move items to the correct parent first
You can’t perform that action at this time.
0 commit comments