jani Tue Jul 7 16:40:21 2009 UTC Modified files: /php-src/main main.c Log: - Fixed bug #48247 (Infinite loop and possible crash during startup with errors) http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.802&r2=1.803&diff_format=u Index: php-src/main/main.c diff -u php-src/main/main.c:1.802 php-src/main/main.c:1.803 --- php-src/main/main.c:1.802 Thu Jun 4 07:41:42 2009 +++ php-src/main/main.c Tue Jul 7 16:40:21 2009 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: main.c,v 1.802 2009/06/04 07:41:42 pajoye Exp $ */ +/* $Id: main.c,v 1.803 2009/07/07 16:40:21 jani Exp $ */ /* {{{ includes */ @@ -608,6 +608,20 @@ static int module_startup = 1; static int module_shutdown = 0; +/* {{{ php_during_module_startup */ +static int php_during_module_startup(void) +{ + return module_startup; +} +/* }}} */ + +/* {{{ php_during_module_shutdown */ +static int php_during_module_shutdown(void) +{ + return module_shutdown; +} +/* }}} */ + /* {{{ php_log_err */ PHPAPI void php_log_err(char *log_message TSRMLS_DC) @@ -630,7 +644,7 @@ char *error_time_str; time(&error_time); - error_time_str = php_format_date("d-M-Y H:i:s", 11, error_time, 1 TSRMLS_CC); + error_time_str = php_format_date("d-M-Y H:i:s", 11, error_time, php_during_module_startup() TSRMLS_CC); len = spprintf(&tmp, 0, "[%s] %s%s", error_time_str, log_message, PHP_EOL); #ifdef PHP_WIN32 php_flock(fd, 2); @@ -679,24 +693,6 @@ } /* }}} */ -/* {{{ php_verror helpers */ - -/* {{{ php_during_module_startup */ -static int php_during_module_startup(void) -{ - return module_startup; -} -/* }}} */ - -/* {{{ php_during_module_shutdown */ -static int php_during_module_shutdown(void) -{ - return module_shutdown; -} -/* }}} */ - -/* }}} */ - /* {{{ php_verror */ /* php_verror is called from php_error_docref<n> functions. * Its purpose is to unify error messages and automatically generate clickable
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php