From 222b2d7512b198771c40c6e8b7befbd008c44ec1 Mon Sep 17 00:00:00 2001 From: naitsirch Date: Tue, 1 Oct 2019 10:26:23 +0200 Subject: [PATCH] Fixed Javascript Pattern of jQuery/DateType (needed for PHP 7.3) Since PHP 7.3 the regular expression `([\\\/.:_;,\s-\ ]{1})` triggers the warning `preg_split(): Compilation failed: invalid range in character class at offset 11`. The range operator '-' has to be escaped, because `\s-\ ` is not a valid range. --- Form/JQuery/Type/DateType.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Form/JQuery/Type/DateType.php b/Form/JQuery/Type/DateType.php index f16dee2b..b397f309 100644 --- a/Form/JQuery/Type/DateType.php +++ b/Form/JQuery/Type/DateType.php @@ -127,7 +127,7 @@ public function getName() protected function getJavascriptPattern(\IntlDateFormatter $formatter) { $pattern = $formatter->getPattern(); - $patterns = preg_split('([\\\/.:_;,\s-\ ]{1})', $pattern); + $patterns = preg_split('([\\\/.:_;,\s\-\ ]{1})', $pattern); $exits = array(); // Transform pattern for JQuery ui datepicker