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

Fix DateInterval->days value #322

Merged
merged 2 commits into from Aug 25, 2013

Conversation

4 participants
@Irker
Copy link
Contributor

commented Apr 9, 2013

When object was created not from DateTime::diff():
in var_dump($object) days property have value "false",
but in var_dump($object->days) have value -99999

Example:
https://gist.github.com/Irker/5346465

Commit was made ​​instinctively, please check my code.

Fix DateInterval->days value
when object was created not from DateTime::diff()
--FILE--
<?php
$interval = new DateInterval('P2Y4DT6H8M');;

This comment has been minimized.

Copy link
@Majkl578

Majkl578 Apr 9, 2013

Contributor

Typo here, double semicolon.

This comment has been minimized.

Copy link
@Irker

Irker Apr 10, 2013

Author Contributor

Thx. Fixed

@weltling

This comment has been minimized.

Copy link
Contributor

commented Apr 15, 2013

Looks good to me, except the 'invert' property would be never -99999. But not a big deal, it'll just get it's value.

@php-pulls php-pulls merged commit 4883185 into php:master Aug 25, 2013

1 check failed

default The Travis build failed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.