Error was thrown when no users are selected before executing the code chunk which manually adds all the user to make the group default. Removed this code and referred $mark_ary instead of $name_ary which will not have selected user ids. PHPBB3-11358