diff options
author | Christoph M. Becker <cmbecker69@gmx.de> | 2019-02-15 13:08:31 +0100 |
---|---|---|
committer | Christoph M. Becker <cmbecker69@gmx.de> | 2019-02-15 13:08:31 +0100 |
commit | 27d9800b1d9d37bc6eacb1000cf63f3f1237b742 (patch) | |
tree | 1e681a33ea20f0bd394ccf25c77fd442859455de | |
parent | 68ed34005c8bca04defc014e1cafc4d7cffd0277 (diff) | |
parent | fae22461f95dfe8153fb74a53b9c5daeec47387f (diff) | |
download | php-git-27d9800b1d9d37bc6eacb1000cf63f3f1237b742.tar.gz |
Merge branch 'PHP-7.4'
* PHP-7.4:
Deprecate case-insensitive constants via typelib import
-rw-r--r-- | ext/com_dotnet/com_com.c | 4 | ||||
-rw-r--r-- | ext/com_dotnet/com_extension.c | 10 |
2 files changed, 13 insertions, 1 deletions
diff --git a/ext/com_dotnet/com_com.c b/ext/com_dotnet/com_com.c index 936896966f..6619cb4b44 100644 --- a/ext/com_dotnet/com_com.c +++ b/ext/com_dotnet/com_com.c @@ -831,6 +831,10 @@ PHP_FUNCTION(com_load_typelib) return; } + if (!cs) { + php_error_docref(NULL, E_DEPRECATED, "Declaration of case-insensitive constants is deprecated"); + } + RETVAL_FALSE; php_com_initialize(); diff --git a/ext/com_dotnet/com_extension.c b/ext/com_dotnet/com_extension.c index e4545ec948..181f3ec0ee 100644 --- a/ext/com_dotnet/com_extension.c +++ b/ext/com_dotnet/com_extension.c @@ -265,11 +265,19 @@ static PHP_INI_MH(OnTypeLibFileUpdate) return SUCCESS; } +static ZEND_INI_MH(OnAutoregisterCasesensitive) +{ + if (!zend_ini_parse_bool(new_value)) { + php_error_docref("com.configuration", E_DEPRECATED, "Declaration of case-insensitive constants is deprecated"); + } + return OnUpdateBool(entry, new_value, mh_arg1, mh_arg2, mh_arg3, stage); +} + PHP_INI_BEGIN() STD_PHP_INI_ENTRY("com.allow_dcom", "0", PHP_INI_SYSTEM, OnUpdateBool, allow_dcom, zend_com_dotnet_globals, com_dotnet_globals) STD_PHP_INI_ENTRY("com.autoregister_verbose", "0", PHP_INI_ALL, OnUpdateBool, autoreg_verbose, zend_com_dotnet_globals, com_dotnet_globals) STD_PHP_INI_ENTRY("com.autoregister_typelib", "0", PHP_INI_ALL, OnUpdateBool, autoreg_on, zend_com_dotnet_globals, com_dotnet_globals) - STD_PHP_INI_ENTRY("com.autoregister_casesensitive", "1", PHP_INI_ALL, OnUpdateBool, autoreg_case_sensitive, zend_com_dotnet_globals, com_dotnet_globals) + STD_PHP_INI_ENTRY("com.autoregister_casesensitive", "1", PHP_INI_ALL, OnAutoregisterCasesensitive, autoreg_case_sensitive, zend_com_dotnet_globals, com_dotnet_globals) STD_PHP_INI_ENTRY("com.code_page", "", PHP_INI_ALL, OnUpdateLong, code_page, zend_com_dotnet_globals, com_dotnet_globals) PHP_INI_ENTRY("com.typelib_file", "", PHP_INI_SYSTEM, OnTypeLibFileUpdate) PHP_INI_END() |