summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorYasuo Ohgaki <yohgaki@php.net>2014-03-12 17:54:22 +0900
committerYasuo Ohgaki <yohgaki@php.net>2014-03-12 17:54:22 +0900
commitca927bb47ea7702532922b648d7a6feba034fca0 (patch)
treeb715f86b95fe448fba7b7096dead7f577a7e82c2 /ext
parent1241a63931069cf061bd74c9594c9a960c382fa6 (diff)
downloadphp-git-ca927bb47ea7702532922b648d7a6feba034fca0.tar.gz
Add missing E_DEPRECATED error for https://wiki.php.net/rfc/default_encoding
Diffstat (limited to 'ext')
-rw-r--r--ext/iconv/iconv.c9
-rw-r--r--ext/iconv/tests/iconv_encoding_basic.phpt1
-rw-r--r--ext/iconv/tests/iconv_get_encoding_basic.phpt2
-rw-r--r--ext/iconv/tests/iconv_ini_encoding.phpt1
-rw-r--r--ext/iconv/tests/iconv_set_encoding_variation.phpt2
-rw-r--r--ext/iconv/tests/iconv_strpos_basic.phpt2
-rw-r--r--ext/iconv/tests/iconv_strpos_variation5.phpt2
-rw-r--r--ext/iconv/tests/iconv_strrpos_basic.phpt2
-rw-r--r--ext/mbstring/mbstring.c17
-rw-r--r--ext/mbstring/tests/bug48697.phpt2
-rw-r--r--ext/mbstring/tests/ini_encoding.phpt1
-rw-r--r--ext/mbstring/tests/zend_multibyte-02.phpt2
-rw-r--r--ext/mbstring/tests/zend_multibyte-06.phpt2
-rw-r--r--ext/mbstring/tests/zend_multibyte-07.phpt1
-rw-r--r--ext/mbstring/tests/zend_multibyte-08.phpt2
-rw-r--r--ext/mbstring/tests/zend_multibyte-09.phpt1
-rw-r--r--ext/mbstring/tests/zend_multibyte-10.phpt2
-rw-r--r--ext/mbstring/tests/zend_multibyte-11.phpt2
18 files changed, 47 insertions, 6 deletions
diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c
index 87ad5eeaab..57aed6b4b0 100644
--- a/ext/iconv/iconv.c
+++ b/ext/iconv/iconv.c
@@ -227,6 +227,9 @@ static PHP_INI_MH(OnUpdateInputEncoding)
return FAILURE;
}
if (new_value_length) {
+ if (stage & (PHP_INI_STAGE_ACTIVATE | PHP_INI_STAGE_RUNTIME)) {
+ php_error_docref("ref.iconv" TSRMLS_CC, E_DEPRECATED, "Use of iconv.input_encoding is deprecated");
+ }
OnUpdateString(entry, new_value, new_value_length, mh_arg1, mh_arg2, mh_arg3, stage TSRMLS_CC);
} else {
OnUpdateString(entry, PG(input_encoding), strlen(PG(input_encoding))+1, mh_arg1, mh_arg2, mh_arg3, stage TSRMLS_CC);
@@ -241,6 +244,9 @@ static PHP_INI_MH(OnUpdateOutputEncoding)
return FAILURE;
}
if (new_value_length) {
+ if (stage & (PHP_INI_STAGE_ACTIVATE | PHP_INI_STAGE_RUNTIME)) {
+ php_error_docref("ref.iconv" TSRMLS_CC, E_DEPRECATED, "Use of iconv.output_encoding is deprecated");
+ }
OnUpdateString(entry, new_value, new_value_length, mh_arg1, mh_arg2, mh_arg3, stage TSRMLS_CC);
} else {
OnUpdateString(entry, PG(output_encoding), strlen(PG(output_encoding))+1, mh_arg1, mh_arg2, mh_arg3, stage TSRMLS_CC);
@@ -255,6 +261,9 @@ static PHP_INI_MH(OnUpdateInternalEncoding)
return FAILURE;
}
if (new_value_length) {
+ if (stage & (PHP_INI_STAGE_ACTIVATE | PHP_INI_STAGE_RUNTIME)) {
+ php_error_docref("ref.iconv" TSRMLS_CC, E_DEPRECATED, "Use of iconv.internal_encoding is deprecated");
+ }
OnUpdateString(entry, new_value, new_value_length, mh_arg1, mh_arg2, mh_arg3, stage TSRMLS_CC);
} else {
OnUpdateString(entry, PG(internal_encoding), strlen(PG(internal_encoding))+1, mh_arg1, mh_arg2, mh_arg3, stage TSRMLS_CC);
diff --git a/ext/iconv/tests/iconv_encoding_basic.phpt b/ext/iconv/tests/iconv_encoding_basic.phpt
index 746858161c..35314f1e69 100644
--- a/ext/iconv/tests/iconv_encoding_basic.phpt
+++ b/ext/iconv/tests/iconv_encoding_basic.phpt
@@ -6,6 +6,7 @@ extension_loaded('iconv') or die('skip');
function_exists('iconv_get_encoding') or die("skip iconv_get_encoding() is not available in this build");
?>
--INI--
+error_reporting=E_ALL & ~E_DEPRECATED
iconv.input_encoding=ISO-8859-1
iconv.internal_encoding=ISO-8859-1
iconv.output_encoding=ISO-8859-1
diff --git a/ext/iconv/tests/iconv_get_encoding_basic.phpt b/ext/iconv/tests/iconv_get_encoding_basic.phpt
index 83efd1586d..84ee932e10 100644
--- a/ext/iconv/tests/iconv_get_encoding_basic.phpt
+++ b/ext/iconv/tests/iconv_get_encoding_basic.phpt
@@ -5,6 +5,8 @@ Oystein Rose <orose@redpill-linpro.com>
#PHPTestFest2009 Norway 2009-06-09 \o/
--SKIPIF--
<?php if (!extension_loaded("iconv")) { echo 'skip extension not available'; } ?>
+--INI--
+error_reporting=E_ALL & ~E_DEPRECATED
--FILE--
<?php
diff --git a/ext/iconv/tests/iconv_ini_encoding.phpt b/ext/iconv/tests/iconv_ini_encoding.phpt
index b9a69824e1..2d02b1c55a 100644
--- a/ext/iconv/tests/iconv_ini_encoding.phpt
+++ b/ext/iconv/tests/iconv_ini_encoding.phpt
@@ -3,6 +3,7 @@ Encoding INI test
--SKIPIF--
<?php extension_loaded('iconv') or die('skip mbstring not available'); ?>
--INI--
+error_reporting=E_ALL & ~E_DEPRECATED
default_charset=ISO-8859-1
internal_encoding=
input_encoding=
diff --git a/ext/iconv/tests/iconv_set_encoding_variation.phpt b/ext/iconv/tests/iconv_set_encoding_variation.phpt
index e239c6c18b..4e097569fd 100644
--- a/ext/iconv/tests/iconv_set_encoding_variation.phpt
+++ b/ext/iconv/tests/iconv_set_encoding_variation.phpt
@@ -5,6 +5,8 @@ Test iconv_set_encoding() function : error functionality
extension_loaded('iconv') or die('skip');
function_exists('iconv_set_encoding') or die("skip iconv_set_encoding() is not available in this build");
?>
+--INI--
+error_reporting=E_ALL & ~E_DEPRECATED
--FILE--
<?php
/* Prototype : bool iconv_set_encoding(string type, string charset)
diff --git a/ext/iconv/tests/iconv_strpos_basic.phpt b/ext/iconv/tests/iconv_strpos_basic.phpt
index 1604465f1d..25f8f1b1fd 100644
--- a/ext/iconv/tests/iconv_strpos_basic.phpt
+++ b/ext/iconv/tests/iconv_strpos_basic.phpt
@@ -5,6 +5,8 @@ Test iconv_strpos() function : basic functionality
extension_loaded('iconv') or die('skip');
function_exists('iconv_strpos') or die("skip iconv_strpos() is not available in this build");
?>
+--INI--
+error_reporting=E_ALL & ~E_DEPRECATED
--FILE--
<?php
/* Prototype : int iconv_strpos(string haystack, string needle [, int offset [, string charset]])
diff --git a/ext/iconv/tests/iconv_strpos_variation5.phpt b/ext/iconv/tests/iconv_strpos_variation5.phpt
index 57a7a90ee4..3db0634215 100644
--- a/ext/iconv/tests/iconv_strpos_variation5.phpt
+++ b/ext/iconv/tests/iconv_strpos_variation5.phpt
@@ -5,6 +5,8 @@ Test iconv_strpos() function : usage variations - Pass different integers as $of
extension_loaded('iconv') or die('skip');
function_exists('iconv_strpos') or die("skip iconv_strpos() is not available in this build");
?>
+--INI--
+error_reporting=E_ALL & ~E_DEPRECATED
--FILE--
<?php
/* Prototype : int iconv_strpos(string haystack, string needle [, int offset [, string charset]])
diff --git a/ext/iconv/tests/iconv_strrpos_basic.phpt b/ext/iconv/tests/iconv_strrpos_basic.phpt
index e275681057..3d34a23f11 100644
--- a/ext/iconv/tests/iconv_strrpos_basic.phpt
+++ b/ext/iconv/tests/iconv_strrpos_basic.phpt
@@ -5,6 +5,8 @@ Test iconv_strrpos() function : basic functionality
extension_loaded('iconv') or die('skip');
function_exists('iconv_strrpos') or die("skip iconv_strrpos() is not available in this build");
?>
+--INI--
+error_reporting=E_ALL & ~E_DEPRECATED
--FILE--
<?php
/* Prototype : proto int iconv_strrpos(string haystack, string needle [, string charset])
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 {
diff --git a/ext/mbstring/tests/bug48697.phpt b/ext/mbstring/tests/bug48697.phpt
index 42bbe9f5a8..93644a5f05 100644
--- a/ext/mbstring/tests/bug48697.phpt
+++ b/ext/mbstring/tests/bug48697.phpt
@@ -2,6 +2,8 @@
Bug #48697 (mb_internal_encoding() value gets reset by parse_str() or mb_parse_str()
--SKIPIF--
<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
+--INI--
+error_reporting=E_ALL & ~E_DEPRECATED
--FILE--
<?php
ini_set('mbstring.internal_encoding', 'ISO-8859-15');
diff --git a/ext/mbstring/tests/ini_encoding.phpt b/ext/mbstring/tests/ini_encoding.phpt
index 79a0f3aad4..b9809b2bfe 100644
--- a/ext/mbstring/tests/ini_encoding.phpt
+++ b/ext/mbstring/tests/ini_encoding.phpt
@@ -3,6 +3,7 @@ Encoding INI test
--SKIPIF--
<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
--INI--
+error_reporting=E_ALL & ~E_DEPRECATED
default_charset=Shift_JIS
internal_encoding=
input_encoding=
diff --git a/ext/mbstring/tests/zend_multibyte-02.phpt b/ext/mbstring/tests/zend_multibyte-02.phpt
index ebc10b48be..8a1a572804 100644
--- a/ext/mbstring/tests/zend_multibyte-02.phpt
+++ b/ext/mbstring/tests/zend_multibyte-02.phpt
@@ -1,7 +1,5 @@
--TEST--
zend multibyte (2)
---XFAIL--
-https://bugs.php.net/bug.php?id=66582
--INI--
zend.multibyte=On
zend.script_encoding=UTF-8
diff --git a/ext/mbstring/tests/zend_multibyte-06.phpt b/ext/mbstring/tests/zend_multibyte-06.phpt
index e0b4ead545..1b8adb5186 100644
--- a/ext/mbstring/tests/zend_multibyte-06.phpt
+++ b/ext/mbstring/tests/zend_multibyte-06.phpt
@@ -1,7 +1,5 @@
--TEST--
zend multibyte (6)
---XFAIL--
-https://bugs.php.net/bug.php?id=66582
--INI--
zend.multibyte=On
zend.script_encoding=EUC-JP
diff --git a/ext/mbstring/tests/zend_multibyte-07.phpt b/ext/mbstring/tests/zend_multibyte-07.phpt
index 08db1d0f70..50d4cd95ed 100644
--- a/ext/mbstring/tests/zend_multibyte-07.phpt
+++ b/ext/mbstring/tests/zend_multibyte-07.phpt
@@ -4,6 +4,7 @@ zend multibyte (7)
--XFAIL--
https://bugs.php.net/bug.php?id=66582
--INI--
+error_reporting=E_ALL & ~E_DEPRECATED
zend.multibyte=On
zend.script_encoding=ISO-8859-1
mbstring.internal_encoding=EUC-JP
diff --git a/ext/mbstring/tests/zend_multibyte-08.phpt b/ext/mbstring/tests/zend_multibyte-08.phpt
index 488e2a00ca..a0989fc562 100644
--- a/ext/mbstring/tests/zend_multibyte-08.phpt
+++ b/ext/mbstring/tests/zend_multibyte-08.phpt
@@ -1,6 +1,8 @@
--TEST--
zend multibyte (8)
--SKIPIF--
+--XFAIL--
+https://bugs.php.net/bug.php?id=66582
--INI--
zend.multibyte=On
zend.script_encoding=ISO-8859-1
diff --git a/ext/mbstring/tests/zend_multibyte-09.phpt b/ext/mbstring/tests/zend_multibyte-09.phpt
index 8ad00b4e1e..7b0015c6c1 100644
--- a/ext/mbstring/tests/zend_multibyte-09.phpt
+++ b/ext/mbstring/tests/zend_multibyte-09.phpt
@@ -4,6 +4,7 @@ zend multibyte (9)
--XFAIL--
https://bugs.php.net/bug.php?id=66582
--INI--
+error_reporting=E_ALL & ~E_DEPRECATED
zend.multibyte=On
zend.script_encoding=cp1251
mbstring.internal_encoding=UTF-8
diff --git a/ext/mbstring/tests/zend_multibyte-10.phpt b/ext/mbstring/tests/zend_multibyte-10.phpt
index 139d973b95..712757c8a7 100644
--- a/ext/mbstring/tests/zend_multibyte-10.phpt
+++ b/ext/mbstring/tests/zend_multibyte-10.phpt
@@ -1,6 +1,8 @@
--TEST--
zend multibyte (10)
--SKIPIF--
+--XFAIL--
+https://bugs.php.net/bug.php?id=66582
--INI--
zend.multibyte=1
--FILE--
diff --git a/ext/mbstring/tests/zend_multibyte-11.phpt b/ext/mbstring/tests/zend_multibyte-11.phpt
index c6e45fa5cd..69624ae006 100644
--- a/ext/mbstring/tests/zend_multibyte-11.phpt
+++ b/ext/mbstring/tests/zend_multibyte-11.phpt
@@ -1,6 +1,8 @@
--TEST--
zend multibyte (11)
--SKIPIF--
+--XFAIL--
+https://bugs.php.net/bug.php?id=66582
--INI--
zend.multibyte=1
--FILE--