diff --git a/src/Validation/Validation.php b/src/Validation/Validation.php index 9908c5614aa..f625a7dd50a 100644 --- a/src/Validation/Validation.php +++ b/src/Validation/Validation.php @@ -481,7 +481,8 @@ public static function localizedTime($check, $type = 'datetime', $format = null) if (empty($methods[$type])) { throw new \InvalidArgumentException('Unsupported parser type given.'); } - return (Time::{$methods[$type]}($check, $format) !== null); + $method = $methods[$type]; + return (Time::$method($check, $format) !== null); } /**