mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-24 18:58:46 +02:00
Fixed exceptions occuring cause of strict_types.
This commit is contained in:
parent
fe0f69f762
commit
67a0dc8131
2 changed files with 8 additions and 2 deletions
|
@ -160,7 +160,7 @@ class SIUnitType extends AbstractType implements DataMapperInterface
|
|||
return null;
|
||||
}
|
||||
|
||||
$data = $this->si_formatter->convertValue($viewData);
|
||||
$data = $this->si_formatter->convertValue((float) $viewData);
|
||||
|
||||
if (isset($forms['prefix'])) {
|
||||
$forms['value']->setData($data['value']);
|
||||
|
|
|
@ -105,7 +105,13 @@ class AttachmentManager
|
|||
return false;
|
||||
}
|
||||
|
||||
return file_exists($this->toAbsoluteFilePath($attachment)) || $attachment->isExternal();
|
||||
$absolute_path = $this->toAbsoluteFilePath($attachment);
|
||||
|
||||
if ($absolute_path === null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return file_exists($absolute_path) || $attachment->isExternal();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue