diff --git a/Controller/ApiController.php b/Controller/ApiController.php index 00699e3..4fe3563 100755 --- a/Controller/ApiController.php +++ b/Controller/ApiController.php @@ -490,7 +490,7 @@ final class ApiController extends Controller } $uploaded = $this->app->moduleManager->get('Media')->uploadFiles( - $request->getData('name') ?? '', + [$request->getData('name') ?? ''], $uploadedFiles, $request->header->account, __DIR__ . '/../../../Modules/Media/Files/Modules/SupplierManagement/' . ($request->getData('supplier') ?? '0'), diff --git a/Models/SupplierAttributeType.php b/Models/SupplierAttributeType.php index e0d2e56..2196b85 100755 --- a/Models/SupplierAttributeType.php +++ b/Models/SupplierAttributeType.php @@ -117,7 +117,7 @@ SupplierAttributeTypeL11n $l11n; { if ($l11n instanceof SupplierAttributeTypeL11n) { $this->l11n = $l11n; - } elseif ($this->l11n instanceof SupplierAttributeTypeL11n) { + } elseif (isset($this->l11n) && $this->l11n instanceof SupplierAttributeTypeL11n) { $this->l11n->title = $l11n; } else { $this->l11n = new SupplierAttributeTypeL11n();