diff options
author | Alexander Moskalev <a.moskalev@corp.badoo.com> | 2013-04-10 00:12:39 +0400 |
---|---|---|
committer | Stanislav Malyshev <stas@php.net> | 2013-08-24 23:38:33 -0700 |
commit | b378b0b081c2c3dd4a7aa25ce4d37bad48db752e (patch) | |
tree | c293ff64b2c60115f824ba4abdacd37ad48ec72d /ext/date/php_date.c | |
parent | e22c139fe09db7e74ad027db49d76921fc1a19fd (diff) | |
download | php-git-b378b0b081c2c3dd4a7aa25ce4d37bad48db752e.tar.gz |
Fix DateInterval->days value when object was created not from DateTime::diff()
Diffstat (limited to 'ext/date/php_date.c')
-rw-r--r-- | ext/date/php_date.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/date/php_date.c b/ext/date/php_date.c index f091fed182..1c97781763 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -3568,7 +3568,11 @@ zval *date_interval_read_property(zval *object, zval *member, int type, const ze ALLOC_INIT_ZVAL(retval); Z_SET_REFCOUNT_P(retval, 0); - ZVAL_LONG(retval, value); + if (value != -99999) { + ZVAL_LONG(retval, value); + } else { + ZVAL_FALSE(retval); + } if (member == &tmp_member) { zval_dtor(member); |