Skip to content

Commit 0b7bdbe

Browse files
authored
Merge pull request #1911 from nclavaud/fix_undefined_root_identifier_method
[tree] Test for property existence
2 parents 5b3d545 + 594749f commit 0b7bdbe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Gedmo/Tree/Strategy/ORM/Nested.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public function processScheduledInsertion($em, $node, AdapterInterface $ea)
125125
if (isset($config['level'])) {
126126
$meta->getReflectionProperty($config['level'])->setValue($node, 0);
127127
}
128-
if (isset($config['root']) && !$meta->hasAssociation($config['root']) && !$config['rootIdentifierMethod']) {
128+
if (isset($config['root']) && !$meta->hasAssociation($config['root']) && !isset($config['rootIdentifierMethod'])) {
129129
$meta->getReflectionProperty($config['root'])->setValue($node, 0);
130130
} else if (isset($config['rootIdentifierMethod']) && is_null($meta->getReflectionProperty($config['root'])->getValue($node))) {
131131
$meta->getReflectionProperty($config['root'])->setValue($node, 0);

0 commit comments

Comments
 (0)