diff options
| author | Xinchen Hui <laruence@php.net> | 2012-09-23 23:00:15 +0800 |
|---|---|---|
| committer | Xinchen Hui <laruence@php.net> | 2012-09-23 23:00:15 +0800 |
| commit | 8fcb4f110794b14ebd9c46524fab1837a00a071f (patch) | |
| tree | 5936ee0e2d577224f3f220e6a9b158075874d7ac /main/main.c | |
| parent | 5de79f9f0717d147b02033e270bea20561707db8 (diff) | |
| parent | 395d77c540a2d9d0745c8b4c75d60599c6e17c87 (diff) | |
| download | php-git-8fcb4f110794b14ebd9c46524fab1837a00a071f.tar.gz | |
Merge branch 'PHP-5.4'
Diffstat (limited to 'main/main.c')
| -rw-r--r-- | main/main.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/main/main.c b/main/main.c index 3e31a8d0b7..ccb98a6474 100644 --- a/main/main.c +++ b/main/main.c @@ -627,7 +627,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); |
