diff options
author | Stanislav Malyshev <stas@php.net> | 2013-08-24 23:38:54 -0700 |
---|---|---|
committer | Stanislav Malyshev <stas@php.net> | 2013-08-24 23:38:54 -0700 |
commit | c0bfccafd2b09e3772adbade33b1e47bd15fcc97 (patch) | |
tree | 2503ac81d0d508d9b46fbeb4343300713f379b94 /ext/date/php_date.c | |
parent | a89e71397d5842e5a322378867ec571739d1c829 (diff) | |
parent | b378b0b081c2c3dd4a7aa25ce4d37bad48db752e (diff) | |
download | php-git-c0bfccafd2b09e3772adbade33b1e47bd15fcc97.tar.gz |
Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
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 f0c9525e56..8afe47fbcc 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -4064,7 +4064,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); |