mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fixes for not finding company_logo on import
This commit is contained in:
parent
f315ebd715
commit
f83590a9dd
@ -403,11 +403,18 @@ class Import implements ShouldQueue
|
|||||||
$company_repository->save($data, $this->company);
|
$company_repository->save($data, $this->company);
|
||||||
|
|
||||||
if (isset($data['settings']->company_logo) && strlen($data['settings']->company_logo) > 0) {
|
if (isset($data['settings']->company_logo) && strlen($data['settings']->company_logo) > 0) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$tempImage = tempnam(sys_get_temp_dir(), basename($data['settings']->company_logo));
|
$tempImage = tempnam(sys_get_temp_dir(), basename($data['settings']->company_logo));
|
||||||
copy($data['settings']->company_logo, $tempImage);
|
copy($data['settings']->company_logo, $tempImage);
|
||||||
$this->uploadLogo($tempImage, $this->company, $this->company);
|
$this->uploadLogo($tempImage, $this->company, $this->company);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
|
|
||||||
|
$settings = $this->company->settings;
|
||||||
|
$settings->company_logo = '';
|
||||||
|
$this->company->settings = $settings;
|
||||||
|
$this->company->save();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user