From 04a1deace0c16923c8f86465ffee5d2574d150f6 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 1 Nov 2011 15:30:43 +0100 Subject: [PATCH] updated CHANGELOG for 2.1 --- CHANGELOG-2.1.md | 5 +++++ .../Component/Validator/Constraints/TypeValidator.php | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG-2.1.md b/CHANGELOG-2.1.md index 1082d1f2bb..087085e2d0 100644 --- a/CHANGELOG-2.1.md +++ b/CHANGELOG-2.1.md @@ -49,6 +49,10 @@ To get the diff between two versions, go to https://github.com/symfony/symfony/c * added a timeline panel * The toolbar position can now be configured via the `position` option (can be `top` or `bottom`) +### Config + + * implemented `Serializable` on resources + ### Console * made the defaults (helper set, commands, input definition) in Application more easily customizable @@ -109,6 +113,7 @@ To get the diff between two versions, go to https://github.com/symfony/symfony/c ### Validator + * added support for `ctype_*` assertions in `TypeValidator` * added a Size validator * added a SizeLength validator * improved the ImageValidator with min width, max width, min height, and max height constraints diff --git a/src/Symfony/Component/Validator/Constraints/TypeValidator.php b/src/Symfony/Component/Validator/Constraints/TypeValidator.php index 519d40c19b..b445eea3d5 100644 --- a/src/Symfony/Component/Validator/Constraints/TypeValidator.php +++ b/src/Symfony/Component/Validator/Constraints/TypeValidator.php @@ -42,9 +42,9 @@ class TypeValidator extends ConstraintValidator if (function_exists($isFunction) && call_user_func($isFunction, $value)) { return true; - } else if (function_exists($ctypeFunction) && call_user_func($ctypeFunction, $value)) { + } elseif (function_exists($ctypeFunction) && call_user_func($ctypeFunction, $value)) { return true; - } else if ($value instanceof $constraint->type) { + } elseif ($value instanceof $constraint->type) { return true; }