mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 05:04:07 -08:00
Check that the array key exists
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
e5800a2dac
commit
1f2d30ebf4
|
@ -71,11 +71,13 @@ class LabelsController extends Controller
|
||||||
collect(explode(';', Setting::getSettings()->label2_fields))
|
collect(explode(';', Setting::getSettings()->label2_fields))
|
||||||
->filter()
|
->filter()
|
||||||
->each(function ($item) use ($customFieldColumns, $exampleAsset) {
|
->each(function ($item) use ($customFieldColumns, $exampleAsset) {
|
||||||
$pair = explode('=', $item);
|
$pair = explode('=', $item);
|
||||||
|
|
||||||
if ($customFieldColumns->contains($pair[1])) {
|
if (array_key_exists(1, $pair)) {
|
||||||
$exampleAsset->{$pair[1]} = "{{$pair[0]}}";
|
if ($customFieldColumns->contains($pair[1])) {
|
||||||
}
|
$exampleAsset->{$pair[1]} = "{{$pair[0]}}";
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$settings = Setting::getSettings();
|
$settings = Setting::getSettings();
|
||||||
|
|
Loading…
Reference in a new issue