Commit: 395d77c540a2d9d0745c8b4c75d60599c6e17c87 Author: Xinchen Hui <larue...@php.net> Sun, 23 Sep 2012 22:59:31 +0800 Parents: c8687ee63b0aa0cbe8da1e8d5c65a338eb69f83a Branches: PHP-5.4
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=395d77c540a2d9d0745c8b4c75d60599c6e17c87 Log: Fixed bug #60723 (error_log error time has changed to UTC ignoring default timezo) Bugs: https://bugs.php.net/60723 Changed paths: M NEWS A ext/standard/tests/general_functions/bug60723.phpt M main/main.c Diff: diff --git a/NEWS b/NEWS index 0082ae9..3a5cf66 100644 --- a/NEWS +++ b/NEWS @@ -24,6 +24,8 @@ PHP NEWS situation). (Dmitry) . Fixed bug #60909 (custom error handler throwing Exception + fatal error = no shutdown function). (Dmitry) + . Fixed bug #60723 (error_log error time has changed to UTC ignoring default + timezo). (Laruence) - DOM: . Fixed bug #63015 (Incorrect arginfo for DOMErrorHandler). (Rob) diff --git a/ext/standard/tests/general_functions/bug60723.phpt b/ext/standard/tests/general_functions/bug60723.phpt new file mode 100644 index 0000000..1d9ef6a --- /dev/null +++ b/ext/standard/tests/general_functions/bug60723.phpt @@ -0,0 +1,17 @@ +--TEST-- +Bug #55371 (get_magic_quotes_gpc() and get_magic_quotes_runtime() throw deprecated warning) +--INI-- +date.timezone=ASIA/Chongqing +log_errors=On +--FILE-- +<?php +$dir = dirname(__FILE__); +$log = $dir . "/tmp.err"; +ini_set("error_log", $log); +echo $aa; +readfile($log); +unlink($log); +?> +--EXPECTF-- +Notice: Undefined variable: aa in %sbug60723.php on line %d +[%s ASIA/Chongqing] PHP Notice: Undefined variable: aa in %sbug60723.php on line %d diff --git a/main/main.c b/main/main.c index 8d97581..44c61c6 100644 --- a/main/main.c +++ b/main/main.c @@ -628,7 +628,15 @@ PHPAPI void php_log_err(char *log_message TSRMLS_DC) char *error_time_str; time(&error_time); - error_time_str = php_format_date("d-M-Y H:i:s e", 13, error_time, 0 TSRMLS_CC); +#ifdef ZTS + if (!php_during_module_startup()) { + error_time_str = php_format_date("d-M-Y H:i:s e", 13, error_time, 1 TSRMLS_CC); + } else { + error_time_str = php_format_date("d-M-Y H:i:s e", 13, error_time, 0 TSRMLS_CC); + } +#else + error_time_str = php_format_date("d-M-Y H:i:s e", 13, error_time, 1 TSRMLS_CC); +#endif len = spprintf(&tmp, 0, "[%s] %s%s", error_time_str, log_message, PHP_EOL); #ifdef PHP_WIN32 php_flock(fd, 2); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php