andrei Wed May 31 17:18:08 2006 UTC
Modified files: (Branch: PHP_5_2)
/php-src/main main.c php_compat.h
Log:
MFB
http://cvs.php.net/viewcvs.cgi/php-src/main/main.c?r1=1.640.2.23.2.6&r2=1.640.2.23.2.7&diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.640.2.23.2.6 php-src/main/main.c:1.640.2.23.2.7
--- php-src/main/main.c:1.640.2.23.2.6 Wed May 24 22:00:15 2006
+++ php-src/main/main.c Wed May 31 17:18:08 2006
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: main.c,v 1.640.2.23.2.6 2006/05/24 22:00:15 edink Exp $ */
+/* $Id: main.c,v 1.640.2.23.2.7 2006/05/31 17:18:08 andrei Exp $ */
/* {{{ includes
*/
@@ -759,7 +759,12 @@
MessageBox(NULL, buffer, error_type_str,
MB_OK|ZEND_SERVICE_MB_STYLE);
}
#endif
- spprintf(&log_buffer, 0, "PHP %s: %s in %s on line
%d", error_type_str, buffer, error_filename, error_lineno);
+ if (SG(request_info).request_uri) {
+ char *query_string =
SG(request_info).query_string;
+ spprintf(&log_buffer, 0, "PHP %s: %s in %s on
line %d [%s%s%s]", error_type_str, buffer, error_filename, error_lineno,
SG(request_info).request_uri, query_string?"?":"", STR_PRINT(query_string));
+ } else {
+ spprintf(&log_buffer, 0, "PHP %s: %s in %s on
line %d", error_type_str, buffer, error_filename, error_lineno);
+ }
php_log_err(log_buffer TSRMLS_CC);
efree(log_buffer);
}
@@ -781,13 +786,23 @@
if (type == E_ERROR) {
int len;
char *buf =
php_escape_html_entities(buffer, buffer_len, &len, 0, ENT_COMPAT, NULL
TSRMLS_CC);
- php_printf("%s<br
/>\n<b>%s</b>: %s in <b>%s</b> on line <b>%d</b><br />\n%s",
STR_PRINT(prepend_string), error_type_str, buf, error_filename, error_lineno,
STR_PRINT(append_string));
+ php_printf("%s<br
/>\n<b>%s</b>: %s in <b>%s</b> on line <b>%d</b>", STR_PRINT(prepend_string),
error_type_str, buf, error_filename, error_lineno);
efree(buf);
} else {
- php_printf("%s<br
/>\n<b>%s</b>: %s in <b>%s</b> on line <b>%d</b><br />\n%s",
STR_PRINT(prepend_string), error_type_str, buffer, error_filename,
error_lineno, STR_PRINT(append_string));
+ php_printf("%s<br
/>\n<b>%s</b>: %s in <b>%s</b> on line <b>%d</b>", STR_PRINT(prepend_string),
error_type_str, buffer, error_filename, error_lineno);
}
+ if (SG(request_info).request_uri) {
+ char *query_string =
SG(request_info).query_string;
+ php_printf(" [<b>%s%s%s</b>]",
SG(request_info).request_uri, query_string?"?":"", STR_PRINT(query_string));
+ }
+ php_printf("<br />\n%s",
STR_PRINT(append_string));
} else {
- php_printf("%s\n%s: %s in %s on line
%d\n%s", STR_PRINT(prepend_string), error_type_str, buffer, error_filename,
error_lineno, STR_PRINT(append_string));
+ php_printf("%s\n%s: %s in %s on line
%d", STR_PRINT(prepend_string), error_type_str, buffer, error_filename,
error_lineno);
+ if (SG(request_info).request_uri) {
+ char *query_string =
SG(request_info).query_string;
+ php_printf(" [%s%s%s]",
SG(request_info).request_uri, query_string?"?":"", STR_PRINT(query_string));
+ }
+ php_printf("\n%s",
STR_PRINT(append_string));
}
}
}
http://cvs.php.net/viewcvs.cgi/php-src/main/php_compat.h?r1=1.25.2.3&r2=1.25.2.3.2.1&diff_format=u
Index: php-src/main/php_compat.h
diff -u php-src/main/php_compat.h:1.25.2.3
php-src/main/php_compat.h:1.25.2.3.2.1
--- php-src/main/php_compat.h:1.25.2.3 Mon Apr 10 11:55:14 2006
+++ php-src/main/php_compat.h Wed May 31 17:18:08 2006
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_compat.h,v 1.25.2.3 2006/04/10 11:55:14 sniper Exp $ */
+/* $Id: php_compat.h,v 1.25.2.3.2.1 2006/05/31 17:18:08 andrei Exp $ */
#ifndef PHP_COMPAT_H
#define PHP_COMPAT_H
@@ -29,6 +29,7 @@
#if defined(HAVE_BUNDLED_PCRE) || !defined(PHP_VERSION)
#define pcre_compile php_pcre_compile
+#define pcre_compile2 php_pcre_compile2
#define pcre_copy_substring php_pcre_copy_substring
#define pcre_exec php_pcre_exec
#define pcre_get_substring php_pcre_substring
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php