Search
j0ke.net Open Build Service
>
Projects
>
internetx
:
php5
:
EL5
:
5.2.9
>
php-5.2.9
> php-5.2.9-bug46889.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File php-5.2.9-bug46889.patch of Package php-5.2.9
--- ext/date/php_date.c-orig 2008-12-24 14:19:30.000000000 -0500 +++ ext/date/php_date.c 2008-12-24 14:18:14.000000000 -0500 @@ -1143,7 +1143,7 @@ t = timelib_strtotime(times, time_len, &error, DATE_TIMEZONEDB); error1 = error->error_count; timelib_error_container_dtor(error); - timelib_fill_holes(t, now, 0); + timelib_fill_holes(t, now, TIMELIB_NO_CLONE); timelib_update_ts(t, tzi); ts = timelib_date_to_int(t, &error2); --- ext/date/lib/timelib.h-orig 2008-12-24 19:29:20.000000000 -0500 +++ ext/date/lib/timelib.h 2008-12-24 19:31:41.000000000 -0500 @@ -28,6 +28,8 @@ #define TIMELIB_NONE 0x00 #define TIMELIB_OVERRIDE_TIME 0x01 +#define TIMELIB_NO_CLONE 0x02 + #define TIMELIB_SPECIAL_WEEKDAY 0x01 --- ext/date/lib/parse_date.c-orig 2008-12-24 19:38:27.000000000 -0500 +++ ext/date/lib/parse_date.c 2008-12-24 19:39:54.000000000 -0500 @@ -22395,7 +22395,7 @@ void timelib_fill_holes(timelib_time *parsed, timelib_time *now, int options) { - if (!(options && TIMELIB_OVERRIDE_TIME) && parsed->have_date && !parsed->have_time) { + if (!(options & TIMELIB_OVERRIDE_TIME) && parsed->have_date && !parsed->have_time) { parsed->h = 0; parsed->i = 0; parsed->s = 0; @@ -22415,7 +22415,8 @@ parsed->tz_abbr = now->tz_abbr ? strdup(now->tz_abbr) : NULL; } if (!parsed->tz_info) { - parsed->tz_info = now->tz_info ? timelib_tzinfo_clone(now->tz_info) : NULL; + parsed->tz_info = now->tz_info ? (!(options & TIMELIB_NO_CLONE) ? timelib_tzinfo_clone(now->tz_info) : now->tz_info) : NULL; + } if (parsed->zone_type == 0 && now->zone_type != 0) { parsed->zone_type = now->zone_type; --- ext/date/lib/parse_date.re-orig 2008-12-24 19:40:48.000000000 -0500 +++ ext/date/lib/parse_date.re 2008-12-24 19:41:44.000000000 -0500 @@ -1619,7 +1619,8 @@ void timelib_fill_holes(timelib_time *parsed, timelib_time *now, int options) { - if (!(options && TIMELIB_OVERRIDE_TIME) && parsed->have_date && !parsed->have_time) { + if (!(options & TIMELIB_OVERRIDE_TIME) && parsed->have_date && !parsed->have_time) { + parsed->h = 0; parsed->i = 0; parsed->s = 0; @@ -1639,7 +1640,9 @@ parsed->tz_abbr = now->tz_abbr ? strdup(now->tz_abbr) : NULL; } if (!parsed->tz_info) { - parsed->tz_info = now->tz_info ? timelib_tzinfo_clone(now->tz_info) : NULL; + parsed->tz_info = now->tz_info ? (!(options & TIMELIB_NO_CLONE) ? timelib_tzinfo_clone(now->tz_info) : now->tz_info) : NULL; + } + } if (parsed->zone_type == 0 && now->zone_type != 0) { parsed->zone_type = now->zone_type;