Skip to content

Commit c2ef8a9

Browse files
committed
Merge branch 'PHP-5.6'
2 parents 0f4d527 + ce9b6e5 commit c2ef8a9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

ext/date/php_date.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -3850,7 +3850,7 @@ PHP_FUNCTION(timezone_transitions_get)
38503850
add_assoc_string(&element, "abbr", &tzobj->tzi.tz->timezone_abbr[tzobj->tzi.tz->type[tzobj->tzi.tz->trans_idx[i]].abbr_idx]); \
38513851
add_next_index_zval(return_value, &element);
38523852

3853-
#define add_last() add(tzobj->tzi.tz->timecnt - 1, timestamp_begin)
3853+
#define add_last() add(tzobj->tzi.tz->bit32.timecnt - 1, timestamp_begin)
38543854

38553855
array_init(return_value);
38563856

@@ -3861,7 +3861,7 @@ PHP_FUNCTION(timezone_transitions_get)
38613861
} else {
38623862
begin = 0;
38633863
found = 0;
3864-
if (tzobj->tzi.tz->timecnt > 0) {
3864+
if (tzobj->tzi.tz->bit32.timecnt > 0) {
38653865
do {
38663866
if (tzobj->tzi.tz->trans[begin] > timestamp_begin) {
38673867
if (begin > 0) {
@@ -3873,18 +3873,18 @@ PHP_FUNCTION(timezone_transitions_get)
38733873
break;
38743874
}
38753875
begin++;
3876-
} while (begin < tzobj->tzi.tz->timecnt);
3876+
} while (begin < tzobj->tzi.tz->bit32.timecnt);
38773877
}
38783878
}
38793879

38803880
if (!found) {
3881-
if (tzobj->tzi.tz->timecnt > 0) {
3881+
if (tzobj->tzi.tz->bit32.timecnt > 0) {
38823882
add_last();
38833883
} else {
38843884
add_nominal();
38853885
}
38863886
} else {
3887-
for (i = begin; i < tzobj->tzi.tz->timecnt; ++i) {
3887+
for (i = begin; i < tzobj->tzi.tz->bit32.timecnt; ++i) {
38883888
if (tzobj->tzi.tz->trans[i] < timestamp_end) {
38893889
add(i, tzobj->tzi.tz->trans[i]);
38903890
}

0 commit comments

Comments
 (0)