diff options
| author | Yasuo Ohgaki <yohgaki@php.net> | 2014-03-12 17:54:22 +0900 |
|---|---|---|
| committer | Yasuo Ohgaki <yohgaki@php.net> | 2014-03-12 17:54:22 +0900 |
| commit | ca927bb47ea7702532922b648d7a6feba034fca0 (patch) | |
| tree | b715f86b95fe448fba7b7096dead7f577a7e82c2 /ext/mbstring/mbstring.c | |
| parent | 1241a63931069cf061bd74c9594c9a960c382fa6 (diff) | |
| download | php-git-ca927bb47ea7702532922b648d7a6feba034fca0.tar.gz | |
Add missing E_DEPRECATED error for https://wiki.php.net/rfc/default_encoding
Diffstat (limited to 'ext/mbstring/mbstring.c')
| -rw-r--r-- | ext/mbstring/mbstring.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index e7f08a3256..001f40a5f9 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -1256,6 +1256,10 @@ static PHP_INI_MH(OnUpdate_mbstring_http_input) MBSTRG(http_input_list) = list; MBSTRG(http_input_list_size) = size; + if (stage & (PHP_INI_STAGE_ACTIVATE | PHP_INI_STAGE_RUNTIME)) { + php_error_docref("ref.mbstring" TSRMLS_CC, E_DEPRECATED, "Use of mbstring.http_input is deprecated"); + } + return SUCCESS; } /* }}} */ @@ -1282,6 +1286,11 @@ static PHP_INI_MH(OnUpdate_mbstring_http_output) } MBSTRG(http_output_encoding) = encoding; MBSTRG(current_http_output_encoding) = encoding; + + if (stage & (PHP_INI_STAGE_ACTIVATE | PHP_INI_STAGE_RUNTIME)) { + php_error_docref("ref.mbstring" TSRMLS_CC, E_DEPRECATED, "Use of mbstring.http_output is deprecated"); + } + return SUCCESS; } /* }}} */ @@ -1315,11 +1324,15 @@ int _php_mb_ini_mbstring_internal_encoding_set(const char *new_value, uint new_v /* {{{ static PHP_INI_MH(OnUpdate_mbstring_internal_encoding) */ static PHP_INI_MH(OnUpdate_mbstring_internal_encoding) { + if (stage & (PHP_INI_STAGE_ACTIVATE | PHP_INI_STAGE_RUNTIME)) { + php_error_docref("ref.mbstring" TSRMLS_CC, E_DEPRECATED, "Use of mbstring.internal_encoding is deprecated"); + } + if (OnUpdateString(entry, new_value, new_value_length, mh_arg1, mh_arg2, mh_arg3, stage TSRMLS_CC) == FAILURE) { return FAILURE; } - if (stage == PHP_INI_STAGE_STARTUP || stage == PHP_INI_STAGE_SHUTDOWN - || stage == PHP_INI_STAGE_RUNTIME) { + + if (stage & (PHP_INI_STAGE_STARTUP | PHP_INI_STAGE_SHUTDOWN | PHP_INI_STAGE_RUNTIME)) { if (new_value_length) { return _php_mb_ini_mbstring_internal_encoding_set(new_value, new_value_length TSRMLS_CC); } else { |
