Christophe Coevoet %!s(int64=14) %!d(string=hai) anos
pai
achega
db76291251
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  1. 3 3
      lib/Gedmo/Tree/Mapping/Driver/Yaml.php

+ 3 - 3
lib/Gedmo/Tree/Mapping/Driver/Yaml.php

@@ -70,10 +70,10 @@ class Yaml extends File implements Driver
             $classMapping = $mapping['gedmo'];
             if (isset($classMapping['tree']['type'])) {
                 $strategy = $classMapping['tree']['type'];
-                if (!in_array($annot->type, $this->strategies)) {
-                    throw new InvalidMappingException("Tree type: {$annot->type} is not available.");
+                if (!in_array($strategy, $this->strategies)) {
+                    throw new InvalidMappingException("Tree type: $strategy is not available.");
                 }
-                $config['strategy'] = $annot->type;
+                $config['strategy'] = $strategy;
             }
         }
         if (isset($mapping['fields'])) {