pajoye Thu, 24 Nov 2011 12:46:45 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=319750
Log:
- merge crt warning change (r216594) and rename the ini to
windows.show_crt_warning
Changed paths:
U php/php-src/branches/PHP_5_3/UPGRADING
U php/php-src/branches/PHP_5_3/main/main.c
U php/php-src/branches/PHP_5_3/main/php_globals.h
U php/php-src/branches/PHP_5_4/main/main.c
U php/php-src/trunk/main/main.c
Modified: php/php-src/branches/PHP_5_3/UPGRADING
===================================================================
--- php/php-src/branches/PHP_5_3/UPGRADING 2011-11-24 11:42:00 UTC (rev
319749)
+++ php/php-src/branches/PHP_5_3/UPGRADING 2011-11-24 12:46:45 UTC (rev
319750)
@@ -343,6 +343,9 @@
- A new directive, request_order, controls the behavior of $_REQUEST
independently of variables_order.
+- A new directive, called windows.show_crt_warning, has been introduced.
+ This directive shows the CRT warnings when enabled. These warnings were
+ displayed by default until now. It is disabled by default.
- New INI directives:
- mail.add_x_header
Modified: php/php-src/branches/PHP_5_3/main/main.c
===================================================================
--- php/php-src/branches/PHP_5_3/main/main.c 2011-11-24 11:42:00 UTC (rev
319749)
+++ php/php-src/branches/PHP_5_3/main/main.c 2011-11-24 12:46:45 UTC (rev
319750)
@@ -544,6 +544,9 @@
STD_PHP_INI_ENTRY("user_ini.filename", ".user.ini",
PHP_INI_SYSTEM, OnUpdateString, user_ini_filename,
php_core_globals, core_globals)
STD_PHP_INI_ENTRY("user_ini.cache_ttl", "300",
PHP_INI_SYSTEM, OnUpdateLong, user_ini_cache_ttl,
php_core_globals, core_globals)
STD_PHP_INI_BOOLEAN("exit_on_timeout", "0",
PHP_INI_ALL, OnUpdateBool, exit_on_timeout,
php_core_globals, core_globals)
+#ifdef PHP_WIN32
+ STD_PHP_INI_BOOLEAN("windows.show_crt_warning", "0",
PHP_INI_ALL, OnUpdateBool,
windows_show_crt_warning, php_core_globals,
core_globals)
+#endif
PHP_INI_END()
/* }}} */
@@ -1787,18 +1790,21 @@
int len;
if (!called) {
- called = 1;
- if (function) {
- if (file) {
- len = _snprintf(buf, sizeof(buf)-1, "Invalid
parameter detected in CRT function '%ws' (%ws:%d)", function, file, line);
+ TSRMLS_FETCH();
+ if(PG(windows_show_crt_warning)) {
+ called = 1;
+ if (function) {
+ if (file) {
+ len = _snprintf(buf, sizeof(buf)-1,
"Invalid parameter detected in CRT function '%ws' (%ws:%d)", function, file,
line);
+ } else {
+ len = _snprintf(buf, sizeof(buf)-1,
"Invalid parameter detected in CRT function '%ws'", function);
+ }
} else {
- len = _snprintf(buf, sizeof(buf)-1, "Invalid
parameter detected in CRT function '%ws'", function);
+ len = _snprintf(buf, sizeof(buf)-1, "Invalid
CRT parameter detected (function not known)");
}
- } else {
- len = _snprintf(buf, sizeof(buf)-1, "Invalid CRT
parameters detected");
+ zend_error(E_WARNING, "%s", buf);
+ called = 0;
}
- zend_error(E_WARNING, "%s", buf);
- called = 0;
}
}
#endif
Modified: php/php-src/branches/PHP_5_3/main/php_globals.h
===================================================================
--- php/php-src/branches/PHP_5_3/main/php_globals.h 2011-11-24 11:42:00 UTC
(rev 319749)
+++ php/php-src/branches/PHP_5_3/main/php_globals.h 2011-11-24 12:46:45 UTC
(rev 319750)
@@ -170,6 +170,10 @@
char *mail_log;
zend_bool in_error_log;
+
+#ifdef PHP_WIN32
+ zend_bool windows_show_crt_warning;
+#endif
};
Modified: php/php-src/branches/PHP_5_4/main/main.c
===================================================================
--- php/php-src/branches/PHP_5_4/main/main.c 2011-11-24 11:42:00 UTC (rev
319749)
+++ php/php-src/branches/PHP_5_4/main/main.c 2011-11-24 12:46:45 UTC (rev
319750)
@@ -514,7 +514,7 @@
STD_PHP_INI_ENTRY("user_ini.cache_ttl", "300",
PHP_INI_SYSTEM, OnUpdateLong, user_ini_cache_ttl,
php_core_globals, core_globals)
STD_PHP_INI_BOOLEAN("exit_on_timeout", "0",
PHP_INI_ALL, OnUpdateBool, exit_on_timeout,
php_core_globals, core_globals)
#ifdef PHP_WIN32
- STD_PHP_INI_BOOLEAN("windows_show_crt_warning", "0",
PHP_INI_ALL, OnUpdateBool,
windows_show_crt_warning, php_core_globals,
core_globals)
+ STD_PHP_INI_BOOLEAN("windows.show_crt_warning", "0",
PHP_INI_ALL, OnUpdateBool,
windows_show_crt_warning, php_core_globals,
core_globals)
#endif
PHP_INI_END()
/* }}} */
Modified: php/php-src/trunk/main/main.c
===================================================================
--- php/php-src/trunk/main/main.c 2011-11-24 11:42:00 UTC (rev 319749)
+++ php/php-src/trunk/main/main.c 2011-11-24 12:46:45 UTC (rev 319750)
@@ -514,7 +514,7 @@
STD_PHP_INI_ENTRY("user_ini.cache_ttl", "300",
PHP_INI_SYSTEM, OnUpdateLong, user_ini_cache_ttl,
php_core_globals, core_globals)
STD_PHP_INI_BOOLEAN("exit_on_timeout", "0",
PHP_INI_ALL, OnUpdateBool, exit_on_timeout,
php_core_globals, core_globals)
#ifdef PHP_WIN32
- STD_PHP_INI_BOOLEAN("windows_show_crt_warning", "0",
PHP_INI_ALL, OnUpdateBool,
windows_show_crt_warning, php_core_globals,
core_globals)
+ STD_PHP_INI_BOOLEAN("windows.show_crt_warning", "0",
PHP_INI_ALL, OnUpdateBool,
windows_show_crt_warning, php_core_globals,
core_globals)
#endif
PHP_INI_END()
/* }}} */
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php