]> granicus.if.org Git - php/commitdiff
Remove ability to import case-insensitive constants from typelibs
authorChristoph M. Becker <cmbecker69@gmx.de>
Tue, 19 Feb 2019 15:53:40 +0000 (16:53 +0100)
committerChristoph M. Becker <cmbecker69@gmx.de>
Tue, 19 Feb 2019 15:54:52 +0000 (16:54 +0100)
According to commit 23a5be3[1], we remove the ability to import case-
insensitive constants, but do not remove the now superfluous parameter
and ini setting.

[1] <http://git.php.net/?p=php-src.git;a=commit;h=23a5be3696f4d92e1b18fd59f3ac63c6a15ea12a>

UPGRADING
ext/com_dotnet/com_com.c
ext/com_dotnet/com_extension.c

index a23f6caea0a8609b6424b9f7cbfcd37b5470ba6d..8c46bd2bf5fd490a675b33d2547efb5d6e7de912 100644 (file)
--- a/UPGRADING
+++ b/UPGRADING
@@ -67,6 +67,12 @@ PHP 8.0 UPGRADE NOTES
     production environments, which can result in information leaks. Please
     ensure that display_errors=Off is used in conjunction with error logging.
 
+- COM:
+  . Removed the ability to import case-insensitive constants from type
+    libraries. The second argument to com_load_typelib() may no longer be false;
+    com.autoregister_casesensitive may no longer be disabled; case-insensitive
+    markers in com.typelib_file are ignored.
+
 - Date:
   . mktime() and gmmktime() now require at least one argument. time() can be
     used to get the current timestamp.
index 6619cb4b44a99af2bf5bae4bcbe508b92aff5b73..5bfc425b64b1a9ef5e256660ff057e25f6cdd8d5 100644 (file)
@@ -832,7 +832,8 @@ PHP_FUNCTION(com_load_typelib)
        }
 
        if (!cs) {
-               php_error_docref(NULL, E_DEPRECATED, "Declaration of case-insensitive constants is deprecated");
+               php_error_docref(NULL, E_WARNING, "Declaration of case-insensitive constants is no longer supported");
+               RETURN_FALSE;
        }
 
        RETVAL_FALSE;
index 94b6b65ee6ac857051ce1dcafbb92d431b873929..3aa59f3720d0b90e23527c6b474818e4ace2c3f3 100644 (file)
@@ -237,8 +237,7 @@ static PHP_INI_MH(OnTypeLibFileUpdate)
                modifier = php_strtok_r(NULL, "#", &strtok_buf);
                if (modifier != NULL) {
                        if (!strcmp(modifier, "cis") || !strcmp(modifier, "case_insensitive")) {
-                               php_error_docref("com.configuration", E_DEPRECATED, "Declaration of case-insensitive constants is deprecated");
-                               mode &= ~CONST_CS;
+                               php_error_docref("com.configuration", E_WARNING, "Declaration of case-insensitive constants is no longer supported; #cis modifier ignored");
                        }
                }
 
@@ -269,7 +268,8 @@ static PHP_INI_MH(OnTypeLibFileUpdate)
 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");
+               php_error_docref("com.configuration", E_WARNING, "Declaration of case-insensitive constants is no longer supported");
+               return FAILURE;
        }
        return OnUpdateBool(entry, new_value, mh_arg1, mh_arg2, mh_arg3, stage);
 }