A free open source IT asset/license management system
Fix for phpstan
snipe182eff35cce8
diff --git a/app/Http/Controllers/Api/AssetsController.php b/app/Http/Controllers/Api/AssetsController.phpindex 3c47c57890..3bd7b605d8 100644--- a/app/Http/Controllers/Api/AssetsController.php+++ b/app/Http/Controllers/Api/AssetsController.php@@ -783,9 +783,7 @@ class AssetsController extends Controller$asset = $request->handleImages($asset);// Update custom fields in the database.- // Check that it's an object and not a collection- // (Sometimes people send arrays here and they shouldn't- if (($model) && ($model instanceof AssetModel) && ($model->fieldset)) {+ if ($model && $model->fieldset) {foreach ($model->fieldset->fields as $field) {// Set the field value based on what was sent in the request