Skip to content
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

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

Closed
wants to merge 4 commits into from

Conversation

@WedgeSama
Copy link
Contributor

commented Oct 17, 2013

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) {

This comment has been minimized.

Copy link
@Tobion

Tobion Oct 17, 2013

Member

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

@fabpot

This comment has been minimized.

Copy link
Member

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)) {

This comment has been minimized.

Copy link
@cordoval

cordoval Oct 28, 2013

Contributor

if ( notice the space

This comment has been minimized.

Copy link
@webmozart

webmozart Nov 9, 2013

Contributor

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

@webmozart

This comment has been minimized.

Copy link
Contributor

commented Nov 9, 2013

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');
}
WedgeSama added 2 commits Nov 14, 2013
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
Projects
None yet
5 participants
You can’t perform that action at this time.