Ver Fonte

Merge pull request #416 from stephpy/fix_exception

Fix message during exception
Christophe Coevoet há 13 anos atrás
pai
commit
d123b57a4e
1 ficheiros alterados com 4 adições e 3 exclusões
  1. 4 3
      lib/Gedmo/SoftDeleteable/Mapping/Validator.php

+ 4 - 3
lib/Gedmo/SoftDeleteable/Mapping/Validator.php

@@ -16,7 +16,7 @@ use Gedmo\Exception\InvalidMappingException;
  * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
  */
 
-class Validator 
+class Validator
 {
     /**
      * List of types which are valid for timestamp
@@ -37,8 +37,9 @@ class Validator
         $fieldMapping = $meta->getFieldMapping($field);
 
         if (!in_array($fieldMapping['type'], self::$validTypes)) {
-            throw new InvalidMappingException(sprintf('Field "%s" must be of one of the following types: "',
-                explode(', ', self::$validTypes)));
+            throw new InvalidMappingException(sprintf('Field "%s" must be of one of the following types: "%s"',
+                $fieldMapping['type'],
+                implode(', ', self::$validTypes)));
         }
     }
 }