mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-03-03 05:55:16 +01:00
Fixed some incompatibility on PHP 7.4
This commit is contained in:
@@ -111,8 +111,9 @@ class StructuralDBElementRepository extends NamedDBElementRepository
|
||||
//See if we already have an element with this name and parent
|
||||
$entity = $this->findOneBy(['name' => $name, 'parent' => $parent]);
|
||||
if (null === $entity) {
|
||||
$class = $this->getClassName();
|
||||
/** @var AbstractStructuralDBElement $entity */
|
||||
$entity = new ($this->getClassName());
|
||||
$entity = new $class;
|
||||
$entity->setName($name);
|
||||
$entity->setParent($parent);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user