Browse Source

Fixed typo

Christophe Coevoet 14 years ago
parent
commit
db76291251
1 changed files with 3 additions and 3 deletions
  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'])) {