mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-10 15:44:11 -08:00
Merge pull request #12131 from snipe/fixes/check_for_format_index_in_custom_field_api_call
Fixed 500 if `format` is not passed to the create custom field endpoint payload
This commit is contained in:
commit
4ffe13d3c2
|
@ -96,7 +96,7 @@ class CustomFieldsController extends Controller
|
|||
$data = $request->all();
|
||||
$regex_format = null;
|
||||
|
||||
if (str_contains($data['format'], 'regex:')) {
|
||||
if ((array_key_exists('format', $data)) && (str_contains($data['format'], 'regex:'))) {
|
||||
$regex_format = $data['format'];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue