Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Form] Fix DateType for 32bits computers. #9314

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed

[Form] Fix DateType for 32bits computers. #9314

wants to merge 4 commits into from

Conversation

WedgeSama
Copy link
Contributor

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #5227,#5554
License MIT
Doc PR -

Fix an issue due to 32bits machines, date can be only between 1902-2037.
Simply not add date if false. Can be good to add this to 2.3 and master too.

Fix an issue due to 32bits machines, date can be only between 1902-2037.
Simply not add date if false.
Issues: #5227 #5554
@@ -300,7 +300,9 @@ private function listYears(array $years)
$result = array();

foreach ($years as $year) {
$result[$year] = gmmktime(0, 0, 0, 6, 15, $year);
if(($y = gmmktime(0, 0, 0, 6, 15, $year)) !== false) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cs: if (false !== $y = gmmktime(0, 0, 0, 6, 15, $year)) {

@fabpot
Copy link
Member

fabpot commented Oct 28, 2013

ping @bschussek

@@ -300,7 +300,9 @@ private function listYears(array $years)
$result = array();

foreach ($years as $year) {
$result[$year] = gmmktime(0, 0, 0, 6, 15, $year);
if(false !== $y = gmmktime(0, 0, 0, 6, 15, $year)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if ( notice the space

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As @cordoval mentioned, could you please insert a space after the if?

@webmozart
Copy link
Contributor

Thank you for fixing this bug! :) Could you please add a test case for this issue? You can add the following code on top of your test to disable it on non-32-bit architectures:

if (4 !== PHP_INT_SIZE) {
    $testCase->markTestSkipped('PHP must be compiled in 32 bit mode to run this test');
}

Test case to check years on 32bits machine.
fabpot added a commit that referenced this pull request Nov 28, 2013
This PR was squashed before being merged into the 2.2 branch (closes #9314).

Discussion
----------

[Form] Fix DateType for 32bits computers.

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #5227,#5554
| License       | MIT
| Doc PR        | -

Fix an issue due to 32bits machines, date can be only between 1902-2037.
Simply not add date if false. Can be good to add this to 2.3 and master too.

Commits
-------

b80fb43 [Form] Fix DateType for 32bits computers.
@fabpot fabpot closed this Nov 28, 2013
fabpot added a commit that referenced this pull request Mar 27, 2018
This PR was merged into the 4.1-dev branch.

Discussion
----------

[FrameworkBundle] keep query in redirect

| Q             | A
| ------------- | ---
| Branch?       | 4.1
| Bug fix?      | no
| New feature?  | yes <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #26256   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | #9314

<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
 - Bug fixes must be submitted against the lowest branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too).
 - Features and deprecations must be submitted against the master branch.
-->

Commits
-------

406bfc9 [FrameworkBundle] keep query params in redirection
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants