-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
74ed329
commit 388e4c1
Showing
2 changed files
with
4 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -530,7 +530,6 @@ public function selectlist(Request $request) | |
* @author [A. Gianotto] [<[email protected]>] | ||
* @param \App\Http\Requests\ImageUploadRequest $request | ||
* @since [v4.0] | ||
* @return JsonResponse | ||
*/ | ||
public function store(ImageUploadRequest $request) | ||
{ | ||
|
@@ -579,6 +578,10 @@ public function store(ImageUploadRequest $request) | |
|
||
if (($model) && ($model->fieldset)) { | ||
foreach ($model->fieldset->fields as $field) { | ||
//reduce "array to string conversion" exceptions - ideally we'd handle this in a form request, but this works for now | ||
if(is_array($request->input($field->db_column, null))) { | ||
return response()->json(Helper::formatStandardApiResponse('error', null, 'This custom field can not be an array', 200)); | ||
} | ||
|
||
// Set the field value based on what was sent in the request | ||
$field_val = $request->input($field->db_column, null); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters