|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
Patch bug_63615_patch_2_memleak_fixed for Date/time related Bug #63615Patch version 2012-12-06 15:26 UTC Return to Bug #63615 | Download this patchThis patch renders other patches obsolete Obsolete patches: Patch Revisions:Developer: njaguar@gmail.com
--- ../php-5.4.9_orig/ext/date/php_date.c 2012-11-20 23:12:20.000000000 -0600
+++ ext/date/php_date.c 2012-12-06 03:19:26.597301993 -0600
@@ -2763,6 +2763,25 @@
dateobj->time->s = 0;
}
}
+
+ if(tmp_time->zone_type) {
+ dateobj->time->zone_type = tmp_time->zone_type;
+ switch (tmp_time->zone_type) {
+ case TIMELIB_ZONETYPE_ID:
+ dateobj->time->tz_info = tmp_time->tz_info;
+ break;
+ case TIMELIB_ZONETYPE_OFFSET:
+ dateobj->time->z = tmp_time->z;
+ break;
+ case TIMELIB_ZONETYPE_ABBR:
+ if(dateobj->time->tz_abbr) free(dateobj->time->tz_abbr);
+ dateobj->time->z = tmp_time->z;
+ dateobj->time->dst = tmp_time->dst;
+ dateobj->time->tz_abbr = strdup(tmp_time->tz_abbr);
+ break;
+ }
+ }
+
timelib_time_dtor(tmp_time);
timelib_update_ts(dateobj->time, NULL);
|
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 04:00:02 2025 UTC |