Skip to content

Commit 17c6134

Browse files
committed
Bug: Illegal offset with some agent config
1 parent bf56130 commit 17c6134

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Views/admin/agent/form_edit.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
></td>
2929
<td><input id="checkbox_agent_{!!$agent->id!!}_cat_{!! $agent_cat->id !!}_auto" name="agent_cats_autoassign[]"
3030
type="checkbox"
31-
value="{{ $agent_cat->id }}" {!! ($agent->categories->whereIn('id',$agent_cat->id)->first()['pivot']['autoassign']==0) ? "" : "checked=\"checked\"" !!}
31+
value="{{ $agent_cat->id }}" {!! ((!$agent->categories->first(function($q) use($agent_cat) { return $q->id == $agent_cat->id;}) || $agent->categories->whereIn('id',$agent_cat->id)->first()['pivot']['autoassign']==0)) ? "" : "checked=\"checked\"" !!}
3232
{!! (count($agent->categories->whereIn('id',$agent_cat->id)) == 0) ? "disabled=\"disabled\"" : "" !!}
3333

3434
></td>

0 commit comments

Comments
 (0)