mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-14 04:14:36 +02:00
Fixed some incompatibility on PHP 7.4
This commit is contained in:
parent
e0c380d81a
commit
5ead9cbf61
2 changed files with 6 additions and 1 deletions
|
@ -79,6 +79,10 @@ class CurrencyEntityType extends StructuralEntityType
|
|||
{
|
||||
$tmp = parent::generateChoiceAttr($choice, $key, $value, $options);
|
||||
|
||||
if (!$choice instanceof Currency) {
|
||||
throw new RuntimeException('The choice must be an instance of '.Currency::class);
|
||||
}
|
||||
|
||||
if(!empty($choice->getIsoCode())) {
|
||||
$symbol = Currencies::getSymbol($choice->getIsoCode());
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue