10000 tests resolution first round · symfony/symfony@61f6acf · GitHub
[go: up one dir, main page]

Skip to content

Commit 61f6acf

Browse files
authored
tests resolution first round
1 parent c2ccd28 commit 61f6acf

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

src/Symfony/Component/Form/Extension/Core/Type/DateTimeType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ public function buildView(FormView $view, FormInterface $form, array $options)
213213
// * the html5 is set to true
214214
// * OR the widget is set to "single_text"
215215
// * the format matches the one expected by HTML5
216-
if ($options['html5'] && 'single_text' === $options['widget'] && self::HTML5_FORMAT === $options['format'] | 'html5' === $options['widget'] && self::HTML5_FORMAT === $options['format']) {
216+
if ($options['html5'] && 'single_text' === $options['widget'] && self::HTML5_FORMAT === $options['format'] || 'html5' === $options['widget'] && self::HTML5_FORMAT === $options['format']) {
217217
$view->vars['type'] = 'datetime-local';
218218

219219
// we need to force the browser to display the seconds by

src/Symfony/Component/Form/Extension/Core/Type/DateType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ public function finishView(FormView $view, FormInterface $form, array $options)
187187
// * the html5 is set to true
188188
// * OR the widget is set to "single_text"
189189
// * the format matches the one expected by HTML5
190-
if ($options['html5'] && 'single_text' === $options['widget'] && self::HTML5_FORMAT === $options['format'] | 'html5' === $options['widget'] && self::HTML5_FORMAT === $options['format']) {
190+
if ($options['html5'] && 'single_text' === $options['widget'] && self::HTML5_FORMAT === $options['format'] || 'html5' === $options['widget'] && self::HTML5_FORMAT === $options['format']) {
191191
$view->vars['type'] = 'date';
192192
}
193193

src/Symfony/Component/Form/Extension/Core/Type/TimeType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ public function buildView(FormView $view, FormInterface $form, array $options)
225225
// * the widget is set to "single_text"
226226
// * the html5 is set to true
227227
// * OR the widget is set to "html5"
228-
if ($options['html5'] && 'single_text' === $options['widget'] | 'html5' === $options['widget']) {
228+
if ($options['html5'] && 'single_text' === $options['widget'] || 'html5' === $options['widget']) {
229229
$view->vars['type'] = 'time';
230230

231231
// we need to force the browser to display the seconds by

src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTypeTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,7 @@ public function testSubmitFromInputTimestampDifferentPattern()
336336
'model_timezone' => 'UTC',
337337
'view_timezone' => 'UTC',
338338
'format' => 'MM*yyyy*dd',
339+
'html5' => false,
339340
'widget' => 'single_text',
340341
'input' => 'timestamp',
341342
]);

0 commit comments

Comments
 (0)
0