-
Notifications
You must be signed in to change notification settings - Fork 7.8k
fix bug 63392 #224
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
fix bug 63392 #224
Conversation
fix Bug #63392 由于 我是第一次参与php源码的工作,有很多东西不太清楚。这个bug 不知道原始的作者 是怎么考虑的,会出现那么奇怪的赋值。
fix bug #63392 old code is if(time->relative.weekday == 0)time->relative.weekday == 7 i don't konw why author write this code
thanks :) |
ok ,由于刚开始 参与,比较生疏。 ------------------ 原始邮件 ------------------ 如果你要删除这段代码, 就整个删除吧 thanks :) — |
Would be nice to keep PR comments in English so other people can read them too ;) |
Ya... try English please. I actually read that one on gmail, and instant translate option was available. but this is not the case for everyone :-) |
I had commit bug63392.phpt in /php-src/ext/date/tests/ i had delete " (time->relative.weekday==0) time->relative.weekday==7 ;" in tm2unixtime.c , these code cause bug63392. |
@@ -0,0 +1,21 @@ | |||
--TEST-- | |||
Bug #63392 (DateTime::modify() start of week inconsistency) | |||
Description: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could use DESCRIPTION Section like this:
https://github.com/php/php-src/blob/master/Zend/tests/bug60825.phpt#L1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I already corrent the mistake that you said above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here, I mean you could move the description to a new section, or it will output with the test name, that looks ugly :)
--DESCRIPTION--
......
the codes you removed seems a intentional logic, so I really doubt this fix. |
Ping @derickr |
Laruence had pinged me about this on IRC, and I would need to re-double check if this is broken in the first place. I am doubting that at the moment, but can't find my copy of my book :-) |
@derickr ping again :) |
For anyone who's interested, the change was introduced in 357292a. |
ping @derickr |
Comment on behalf of cmb at php.net: This PR is obsolete, as the issue has already been fixed with commit f43f6fc. |
i delete these code if(time->relative.weekday == 0)time->relative.weekday == 7; these code cause bug 63392 , bug test script blow
modify("Sunday this week"); var_dump($dt->format('r')); ## Expected result: string(31) "Sun, 13 May 2012 00:00:00 +0000" ## Actual result: string(31) "Sun, 20 May 2012 00:00:00 +0000"