thetaphi Fri Apr 27 00:29:26 2007 UTC
Modified files: (Branch: PHP_5_2)
/php-src/sapi/nsapi nsapi.c
Log:
MFH: Fix crash on server startup when log message is printed
http://cvs.php.net/viewvc.cgi/php-src/sapi/nsapi/nsapi.c?r1=1.69.2.3.2.5&r2=1.69.2.3.2.6&diff_format=u
Index: php-src/sapi/nsapi/nsapi.c
diff -u php-src/sapi/nsapi/nsapi.c:1.69.2.3.2.5
php-src/sapi/nsapi/nsapi.c:1.69.2.3.2.6
--- php-src/sapi/nsapi/nsapi.c:1.69.2.3.2.5 Tue Mar 6 18:15:25 2007
+++ php-src/sapi/nsapi/nsapi.c Fri Apr 27 00:29:26 2007
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: nsapi.c,v 1.69.2.3.2.5 2007/03/06 18:15:25 thetaphi Exp $ */
+/* $Id: nsapi.c,v 1.69.2.3.2.6 2007/04/27 00:29:26 thetaphi Exp $ */
/*
* PHP includes
@@ -308,7 +308,7 @@
PHP_MINFO_FUNCTION(nsapi)
{
php_info_print_table_start();
- php_info_print_table_row(2, "NSAPI Module Revision", "$Revision:
1.69.2.3.2.5 $");
+ php_info_print_table_row(2, "NSAPI Module Revision", "$Revision:
1.69.2.3.2.6 $");
php_info_print_table_row(2, "Server Software", system_version());
php_info_print_table_row(2, "Sub-requests with nsapi_virtual()",
(nsapi_servact_service)?((zend_ini_long("zlib.output_compression",
sizeof("zlib.output_compression"), 0))?"not supported with
zlib.output_compression":"enabled"):"not supported on this platform" );
@@ -709,7 +709,11 @@
TSRMLS_FETCH();
nsapi_request_context *rc = (nsapi_request_context *)SG(server_context);
- log_error(LOG_INFORM, pblock_findval("fn", rc->pb), rc->sn, rc->rq,
"%s", message);
+ if (rc) {
+ log_error(LOG_INFORM, pblock_findval("fn", rc->pb), rc->sn,
rc->rq, "%s", message);
+ } else {
+ log_error(LOG_INFORM, "php5", NULL, NULL, "%s", message);
+ }
}
static time_t sapi_nsapi_get_request_time(TSRMLS_D)
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php