Explorar o código

Merge pull request #416 from stephpy/fix_exception

Fix message during exception
Christophe Coevoet %!s(int64=13) %!d(string=hai) anos
pai
achega
d123b57a4e
Modificáronse 1 ficheiros con 4 adicións e 3 borrados
  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)));
         }
     }
 }