Skip to content

Commit 594749f

Browse files
committed
[tree] Test for property existence
ref #1910 Instead of testing the property value, test its existence.
1 parent f61d144 commit 594749f

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)