From: Ilia Alshanetsky Date: Mon, 4 Jul 2005 18:13:15 +0000 (+0000) Subject: Make sure the timezone is NULL, if change operation fails. Ex. memory_limit X-Git-Tag: php-5.1.0b3~185 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=95e3f662998a8f77f2f426118afce40736648934;p=php Make sure the timezone is NULL, if change operation fails. Ex. memory_limit --- diff --git a/ext/date/php_date.c b/ext/date/php_date.c index ca80f07cad..03be35cc91 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -747,6 +747,7 @@ PHP_FUNCTION(date_timezone_set) } if (DATEG(timezone)) { efree(DATEG(timezone)); + DATEG(timezone) = NULL; } DATEG(timezone) = estrndup(zone, zone_len); RETURN_TRUE;