mirror of
https://github.com/php/php-src.git
synced 2025-01-21 03:03:41 +08:00
Fixed bug #39548 (ZMSG_LOG_SCRIPT_NAME not routed to OutputDebugString() on Windows)
This commit is contained in:
parent
6a8f267db6
commit
79c3defac0
2
NEWS
2
NEWS
@ -43,6 +43,8 @@ PHP NEWS
|
||||
- Added optimization for imageline with horizontal and vertial lines (Pierre)
|
||||
- Fixed bug #39602 (Invalid session.save_handler crashes PHP). (Dmitry)
|
||||
- Fixed bug #39576 (array_walk() doesn't separate userdata zval). (Tony)
|
||||
- Fixed bug #39548 (ZMSG_LOG_SCRIPT_NAME not routed to OutputDebugString()
|
||||
on Windows). (Dmitry)
|
||||
- Fixed bug #39538 (fgetcsv can't handle starting newlines and trailing odd
|
||||
number of backslashes). (David Soria Parra, Pierre)
|
||||
- Fixed bug #39454 (Returning a SOAP array segfaults PHP). (Dmitry)
|
||||
|
@ -1005,12 +1005,18 @@ static void php_message_handler_for_zend(long message, void *data)
|
||||
struct tm *ta, tmbuf;
|
||||
time_t curtime;
|
||||
char *datetime_str, asctimebuf[52];
|
||||
char memory_leak_buf[4096];
|
||||
|
||||
time(&curtime);
|
||||
ta = php_localtime_r(&curtime, &tmbuf);
|
||||
datetime_str = php_asctime_r(ta, asctimebuf);
|
||||
datetime_str[strlen(datetime_str)-1]=0; /* get rid of the trailing newline */
|
||||
fprintf(stderr, "[%s] Script: '%s'\n", datetime_str, SAFE_FILENAME(SG(request_info).path_translated));
|
||||
snprintf(memory_leak_buf, sizeof(memory_leak_buf), "[%s] Script: '%s'\n", datetime_str, SAFE_FILENAME(SG(request_info).path_translated));
|
||||
# if defined(PHP_WIN32)
|
||||
OutputDebugString(memory_leak_buf);
|
||||
# else
|
||||
fprintf(stderr, "%s", memory_leak_buf);
|
||||
# endif
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user