Skip to content

Commit eecf948

Browse files
committed
Internal: Add another validation on array contents in CourseMaintenanceController.php
1 parent e01b03d commit eecf948

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/CoreBundle/Controller/CourseMaintenanceController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1393,8 +1393,8 @@ private function filterLegacyCourseBySelection(object $course, array $selected):
13931393
};
13941394

13951395
// Forums flow
1396-
if (!empty($selected)) {
1397-
$selForums = array_fill_keys(array_map('strval', array_keys($selected['forum'] ?? [])), true);
1396+
if (!empty($selected) && !empty($selected['forum'])) {
1397+
$selForums = array_fill_keys(array_map('strval', array_keys($selected['forum'])), true);
13981398
if (!empty($selForums)) {
13991399
$forums = $getBucket($orig, 'forum');
14001400
$catsToKeep = [];

0 commit comments

Comments
 (0)