Fixed exceptions occuring cause of strict_types.

This commit is contained in:
Jan Böhmer 2020-01-05 21:09:19 +01:00
parent fe0f69f762
commit 67a0dc8131
2 changed files with 8 additions and 2 deletions

View file

@ -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']);

View file

@ -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();
}
/**