Procházet zdrojové kódy

Merge pull request #416 from stephpy/fix_exception

Fix message during exception
Christophe Coevoet před 13 roky
rodič
revize
d123b57a4e
1 změnil soubory, kde provedl 4 přidání a 3 odebrání
  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)));
         }
     }
 }