diff --git a/src/Symfony/Component/Validator/ExecutionContext.php b/src/Symfony/Component/Validator/ExecutionContext.php index af9b2e6b32..75fe059dbb 100644 --- a/src/Symfony/Component/Validator/ExecutionContext.php +++ b/src/Symfony/Component/Validator/ExecutionContext.php @@ -172,9 +172,9 @@ class ExecutionContext implements ExecutionContextInterface /** * {@inheritdoc} */ - public function getPropertyPath($subPath = null) + public function getPropertyPath($subPath = '') { - if (null !== $subPath && '' !== $this->propertyPath && '' !== $subPath && '[' !== $subPath[0]) { + if ('' != $subPath && '' !== $this->propertyPath && '[' !== $subPath[0]) { return $this->propertyPath . '.' . $subPath; } diff --git a/src/Symfony/Component/Validator/ExecutionContextInterface.php b/src/Symfony/Component/Validator/ExecutionContextInterface.php index cae91a99b4..1d065c888c 100644 --- a/src/Symfony/Component/Validator/ExecutionContextInterface.php +++ b/src/Symfony/Component/Validator/ExecutionContextInterface.php @@ -300,5 +300,5 @@ interface ExecutionContextInterface * string if the validator is currently validating the * root value of the validation graph. */ - public function getPropertyPath($subPath = null); + public function getPropertyPath($subPath = ''); }