derick Wed Apr 16 17:21:46 2008 UTC Added files: (Branch: PHP_5_2) /php-src/ext/date/tests bug44742.phpt
Modified files: /php-src NEWS /php-src/ext/date php_date.c Log: - Fixed bug #44703 (htmlspecialchars() does not detect bad character set argument). http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1142&r2=1.2027.2.547.2.1143&diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.1142 php-src/NEWS:1.2027.2.547.2.1143 --- php-src/NEWS:1.2027.2.547.2.1142 Fri Apr 11 19:01:24 2008 +++ php-src/NEWS Wed Apr 16 17:21:44 2008 @@ -1,8 +1,9 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? Apr 2008, PHP 5.2.6 -- Fixed bug #44703 (htmlspecialchars() does not detect bad character set argument) - (Andy Wharmby) +- Fixed bug #44703 (htmlspecialchars() does not detect bad character set + argument). (Andy Wharmby) +- Fixed bug #44742 (timezone_offset_get() causes segmentation faults). (Derick) 10 Apr 2008, PHP 5.2.6RC5 - Fixed incorrect heredoc handling when label is used within the block. @@ -29,6 +30,9 @@ (Ilia) - Fixed bug #44557 (Crash in imap_setacl when supplied integer as username) (Thomas Jarosch) +- Fixed a bug in formatting timestamps when DST is active in the default + timezone (Derick) + 27 Mar 2008, PHP 5.2.6RC3 - Properly address incomplete multibyte chars inside escapeshellcmd() (Ilia, http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.43.2.45.2.57&r2=1.43.2.45.2.58&diff_format=u Index: php-src/ext/date/php_date.c diff -u php-src/ext/date/php_date.c:1.43.2.45.2.57 php-src/ext/date/php_date.c:1.43.2.45.2.58 --- php-src/ext/date/php_date.c:1.43.2.45.2.57 Mon Mar 31 09:12:15 2008 +++ php-src/ext/date/php_date.c Wed Apr 16 17:21:46 2008 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_date.c,v 1.43.2.45.2.57 2008/03/31 09:12:15 derick Exp $ */ +/* $Id: php_date.c,v 1.43.2.45.2.58 2008/04/16 17:21:46 derick Exp $ */ #include "php.h" #include "php_streams.h" @@ -2271,9 +2271,19 @@ dateobj = (php_date_obj *) zend_object_store_get_object(dateobject TSRMLS_CC); DATE_CHECK_INITIALIZED(dateobj->time, DateTime); - offset = timelib_get_time_zone_info(dateobj->time->sse, tzobj->tzi.tz); - RETVAL_LONG(offset->offset); - timelib_time_offset_dtor(offset); + switch (tzobj->type) { + case TIMELIB_ZONETYPE_ID: + offset = timelib_get_time_zone_info(dateobj->time->sse, tzobj->tzi.tz); + RETVAL_LONG(offset->offset); + timelib_time_offset_dtor(offset); + break; + case TIMELIB_ZONETYPE_OFFSET: + RETURN_LONG(tzobj->tzi.utc_offset * -60); + break; + case TIMELIB_ZONETYPE_ABBR: + RETURN_LONG((tzobj->tzi.z.utc_offset - (tzobj->tzi.z.dst*60)) * -60); + break; + } } /* }}} */ http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/bug44742.phpt?view=markup&rev=1.1 Index: php-src/ext/date/tests/bug44742.phpt +++ php-src/ext/date/tests/bug44742.phpt -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php