]> granicus.if.org Git - php/commitdiff
- MFH Add E_DEPRECATED (Lars Strojny, Felipe Pena, Marcus)
authorMarcus Boerger <helly@php.net>
Sat, 23 Feb 2008 17:06:22 +0000 (17:06 +0000)
committerMarcus Boerger <helly@php.net>
Sat, 23 Feb 2008 17:06:22 +0000 (17:06 +0000)
[DOC] Finally added deprecation messages

37 files changed:
NEWS
Zend/tests/bug33771.phpt
Zend/tests/bug34767.phpt
Zend/tests/error_reporting01.phpt
Zend/tests/error_reporting02.phpt
Zend/tests/error_reporting03.phpt
Zend/tests/error_reporting04.phpt
Zend/tests/error_reporting05.phpt
Zend/tests/error_reporting06.phpt
Zend/tests/error_reporting07.phpt
Zend/tests/error_reporting08.phpt
Zend/tests/error_reporting09.phpt
Zend/tests/error_reporting10.phpt
Zend/tests/is_a.phpt
Zend/zend.c
Zend/zend_builtin_functions.c
Zend/zend_compile.c
Zend/zend_constants.c
Zend/zend_errors.h
Zend/zend_execute_API.c
Zend/zend_language_parser.y
Zend/zend_vm_def.h
Zend/zend_vm_execute.h
ext/date/php_date.c
ext/mysql/php_mysql.c
ext/standard/basic_functions.c
ext/standard/dl.c
ext/standard/file.c
ext/standard/string.c
ext/standard/tests/file/magic_quotes.phpt
ext/standard/tests/serialize/bug31402.phpt
ext/standard/tests/strings/setlocale_error.phpt
main/main.c
tests/classes/new_001.phpt
tests/lang/bug20175.phpt
tests/lang/bug22231.phpt
tests/lang/bug22510.phpt

diff --git a/NEWS b/NEWS
index be66d679fd2a1cea464e9e694cdee463131c7222..5b43b55b7d19ea0d69f231b5a4911bb2d10b533a 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,8 @@
 PHP                                                                        NEWS
 |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 ?? ??? 20??, PHP 5.3.0
+- Add new error mode E_DEPRECATED that informs about stuff that gets dropped in
+  later PHP versions. (Lars Strojny, Felipe, Marcus)
 - Added and improved PHP syntax and semantics:
   . Added NOWDOC. (Gwynne Raskind, Stas, Dmitry)
   . Added "?:" operator. (Marcus)
index a786e5806613486790b72c8ab6f7c9336a8cfbbc..5d6f5ca96ded8b78c77b3ce0c9a6c28dad386866 100644 (file)
@@ -34,7 +34,7 @@ var_dump(error_reporting());
 echo "Done\n";
 ?>
 --EXPECTF--    
-int(8191)
-int(8191)
-int(6143)
+int(16383)
+int(16383)
+int(14335)
 Done
index 45af9f944c64dcf25dc10beeb0dd9216ba0a8a09..eaede243fc672fce67ec8f898a2b732bb6da2cbe 100755 (executable)
@@ -2,7 +2,7 @@
 Bug #34767 (Zend Engine 1 Compatibility not copying objects correctly)
 --INI--
 zend.ze1_compatibility_mode=1
-error_reporting=4095
+error_reporting=E_ALL | E_DEPRECATED | E_STRICT
 --FILE--
 <?php
 $a->y = &new stdClass();
@@ -13,7 +13,7 @@ print_r($b);
 ?>
 --EXPECTF--
 
-Strict Standards: Assigning the return value of new by reference is deprecated in %sbug34767.php on line 2
+Deprecated: Assigning the return value of new by reference is deprecated in %sbug34767.php on line 2
 stdClass Object
 (
     [y] => stdClass Object
index 60be0239092c022495813456b6413b41b1597ce5..a53628ca28442520239999275a2415213f1b99db 100644 (file)
@@ -22,5 +22,5 @@ var_dump(error_reporting());
 echo "Done\n";
 ?>
 --EXPECT--     
-int(6143)
+int(14335)
 Done
index 227d8c6f26068273afa82c50dc01b480c74273f1..252700c098cfd539986da6618dc177a5c28ce9c8 100644 (file)
@@ -23,5 +23,5 @@ var_dump(error_reporting());
 echo "Done\n";
 ?>
 --EXPECT--     
-int(8191)
+int(16383)
 Done
index ec916048df5290b3a4c6908316bc17b2f4d979fd..21770da15aa7e961d023c6e7ffe04345d0021bd3 100644 (file)
@@ -31,5 +31,5 @@ echo "Done\n";
 ?>
 --EXPECTF--    
 Notice: Undefined variable: undef2 in %s on line %d
-int(8191)
+int(16383)
 Done
index 1d7d678b2307c96e7159ca8bfa17897baf8e4012..21707d356b68318df0659c6ffc816fbe9f9424ae 100644 (file)
@@ -19,5 +19,5 @@ echo "Done\n";
 ?>
 --EXPECTF--
 Notice: Undefined variable: undef in %s on line %d
-int(8191)
+int(16383)
 Done
index 71fee17f4c81714e154916c40c8b092163e720fd..2ff03e71f2183005727228a8c81a1a58b18b368c 100644 (file)
@@ -30,5 +30,5 @@ echo "Done\n";
 Notice: Undefined variable: undef_value in %s on line %d
 
 Notice: Undefined variable: undef_name in %s on line %d
-int(6143)
+int(14335)
 Done
index f472d340513d2dd28ee0c4a10fc5ca7d51eb340a..8a689d5fc35a444dd398920f5f071b008b652763 100644 (file)
@@ -26,5 +26,5 @@ var_dump(error_reporting());
 echo "Done\n";
 ?>
 --EXPECTF--    
-int(6143)
+int(14335)
 Done
index 696a3757ede6a3bf418b7f89905e04e7e6595f9e..cd2449a394cc2d46e63be8c723e0ef1c5c49dc33 100644 (file)
@@ -26,5 +26,5 @@ var_dump(error_reporting());
 echo "Done\n";
 ?>
 --EXPECTF--    
-int(6143)
+int(14335)
 Done
index 362aa37650d1389f3c160c78463d29e4c4f91e7e..9018e7ca1c772cf14b0aac5b482e0acd9119c1ee 100644 (file)
@@ -28,5 +28,5 @@ echo "Done\n";
 ?>
 --EXPECTF--    
 Notice: Undefined variable: undef3 in %s on line %d
-int(8191)
+int(16383)
 Done
index 193758148c00fd39fe9720181765a4ffe680b060..76cff2c1daeb2851ff77dfff5a2dbe4cd5302347 100644 (file)
@@ -27,5 +27,5 @@ echo "Done\n";
 Notice: Undefined variable: blah in %s on line %d
 
 Notice: Undefined variable: undef2 in %s on line %d
-int(8191)
+int(16383)
 Done
index 1d0abb10f3f06a5566fd8b1a819c501be197ee30..45fee5849d9f3a894b3306b7e763fce848f4492f 100644 (file)
@@ -30,6 +30,6 @@ var_dump(error_reporting());
 echo "Done\n";
 ?>
 --EXPECTF--    
-int(6143)
-int(6135)
+int(14335)
+int(14327)
 Done
index f24a6aadb30bec7c3bfbc82d9bd95d667e31c4dc..fd52b5a65a136908437be37faea8b18f96a8203e 100755 (executable)
@@ -1,7 +1,7 @@
 --TEST--
 is_a() and is_subclass_of() shouldn't call __autoload
 --INI--
-error_reporting=4095
+error_reporting=14335
 --FILE--
 <?php
 function __autoload($name) {
@@ -31,16 +31,16 @@ var_dump(is_subclass_of($a, "INT"));
 var_dump(is_subclass_of("X1", "X2"));
 ?>
 --EXPECTF--
-Strict Standards: is_a(): Deprecated. Please use the instanceof operator in %sis_a.php on line 17
+Deprecated: is_a(): Deprecated. Please use the instanceof operator in %sis_a.php on line 17
 bool(false)
 
-Strict Standards: is_a(): Deprecated. Please use the instanceof operator in %sis_a.php on line 18
+Deprecated: is_a(): Deprecated. Please use the instanceof operator in %sis_a.php on line 18
 bool(true)
 
-Strict Standards: is_a(): Deprecated. Please use the instanceof operator in %sis_a.php on line 19
+Deprecated: is_a(): Deprecated. Please use the instanceof operator in %sis_a.php on line 19
 bool(true)
 
-Strict Standards: is_a(): Deprecated. Please use the instanceof operator in %sis_a.php on line 20
+Deprecated: is_a(): Deprecated. Please use the instanceof operator in %sis_a.php on line 20
 bool(true)
 bool(false)
 bool(false)
index 69764c562ac1a24d4ebdc0ca161010765c558971..9f9f4965723298386b331834976bee04c18ca12f 100644 (file)
@@ -66,7 +66,7 @@ static int (*zend_get_configuration_directive_p)(char *name, uint name_length, z
 static ZEND_INI_MH(OnUpdateErrorReporting) /* {{{ */
 {
        if (!new_value) {
-               EG(error_reporting) = E_ALL & ~E_NOTICE & ~E_STRICT;
+               EG(error_reporting) = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED;
        } else {
                EG(error_reporting) = atoi(new_value);
        }
@@ -974,6 +974,7 @@ ZEND_API void zend_error(int type, const char *format, ...) /* {{{ */
                case E_ERROR:
                case E_NOTICE:
                case E_STRICT:
+               case E_DEPRECATED:
                case E_WARNING:
                case E_USER_ERROR:
                case E_USER_WARNING:
index c30163a0b0cbdf3c333c85935d14471b4b8e72bd..2085435e08be7fb26d58663894a157a6a6ab86f9 100644 (file)
@@ -744,7 +744,7 @@ ZEND_FUNCTION(is_subclass_of)
    Returns true if the object is of this class or has this class as one of its parents */
 ZEND_FUNCTION(is_a)
 {
-       zend_error(E_STRICT, "is_a(): Deprecated. Please use the instanceof operator");
+       zend_error(E_DEPRECATED, "is_a(): Deprecated. Please use the instanceof operator");
        is_a_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0);
 }
 /* }}} */
index b95f8eba479e6e193809ca636865ff7d1358e647..18082c60bbce3bd4a7e5724cee618edc090e5767 100644 (file)
@@ -477,7 +477,7 @@ void fetch_array_dim(znode *result, znode *parent, znode *dim TSRMLS_DC)
 void fetch_string_offset(znode *result, znode *parent, znode *offset TSRMLS_DC)
 {
 #ifdef ilia_0
-       zend_error(E_STRICT, "Usage of {} to access string offsets is deprecated and will be removed in PHP 6");
+       zend_error(E_DEPRECATED, "Usage of {} to access string offsets is deprecated and will be removed in PHP 6");
 #endif
        fetch_array_dim(result, parent, offset TSRMLS_CC);
 }
@@ -1853,7 +1853,7 @@ void zend_do_pass_param(znode *param, zend_uchar op, int offset TSRMLS_DC)
 
        if (original_op==ZEND_SEND_REF
                && !CG(allow_call_time_pass_reference)) {
-               zend_error(E_COMPILE_WARNING,
+               zend_error(E_DEPRECATED,
                                        "Call-time pass-by-reference has been deprecated; "
                                        "If you would like to pass it by reference, modify the declaration of %s().  "
                                        "If you would like to enable call-time pass-by-reference, you can set "
index e4ae38420b5e35ac5e816fd762587816481fd6e5..3ca4a29e8c235ab69a5a8f8941efe7f3bacc18c4 100644 (file)
@@ -101,6 +101,7 @@ void zend_register_standard_constants(TSRMLS_D)
        REGISTER_MAIN_LONG_CONSTANT("E_PARSE", E_PARSE, CONST_PERSISTENT | CONST_CS);
        REGISTER_MAIN_LONG_CONSTANT("E_NOTICE", E_NOTICE, CONST_PERSISTENT | CONST_CS);
        REGISTER_MAIN_LONG_CONSTANT("E_STRICT", E_STRICT, CONST_PERSISTENT | CONST_CS);
+       REGISTER_MAIN_LONG_CONSTANT("E_DEPRECATED", E_DEPRECATED, CONST_PERSISTENT | CONST_CS);
        REGISTER_MAIN_LONG_CONSTANT("E_CORE_ERROR", E_CORE_ERROR, CONST_PERSISTENT | CONST_CS);
        REGISTER_MAIN_LONG_CONSTANT("E_CORE_WARNING", E_CORE_WARNING, CONST_PERSISTENT | CONST_CS);
        REGISTER_MAIN_LONG_CONSTANT("E_COMPILE_ERROR", E_COMPILE_ERROR, CONST_PERSISTENT | CONST_CS);
index 480078d4d2eb73b222a6cb6d6555093aa3f4f2f4..1f5d0e74bb07d3e00f6bec653e9d1f0df690890a 100644 (file)
@@ -35,8 +35,9 @@
 #define E_USER_NOTICE          (1<<10L)
 #define E_STRICT                       (1<<11L)
 #define E_RECOVERABLE_ERROR    (1<<12L)
+#define E_DEPRECATED           (1<<13L)
 
-#define E_ALL (E_ERROR | E_WARNING | E_PARSE | E_NOTICE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_USER_ERROR | E_USER_WARNING | E_USER_NOTICE | E_RECOVERABLE_ERROR)
+#define E_ALL (E_ERROR | E_WARNING | E_PARSE | E_NOTICE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_USER_ERROR | E_USER_WARNING | E_USER_NOTICE | E_RECOVERABLE_ERROR | E_DEPRECATED)
 #define E_CORE (E_CORE_ERROR | E_CORE_WARNING)
 
 #endif /* ZEND_ERRORS_H */
index 8b5b08be598fd904350151337c4f74cd9900ef13..d7373d86cd7084fe79d932894d767f7947719e94 100644 (file)
@@ -937,7 +937,7 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS
                        zend_error_noreturn(E_ERROR, "Cannot call abstract method %s::%s()", EX(function_state).function->common.scope->name, EX(function_state).function->common.function_name);
                }
                if (EX(function_state).function->common.fn_flags & ZEND_ACC_DEPRECATED) {
-                       zend_error(E_STRICT, "Function %s%s%s() is deprecated",
+                       zend_error(E_DEPRECATED, "Function %v%s%v() is deprecated",
                                EX(function_state).function->common.scope ? EX(function_state).function->common.scope->name : "",
                                EX(function_state).function->common.scope ? "::" : "",
                                EX(function_state).function->common.function_name);
index 9c6baca7efa012223e8a4b92d3792f65791de4a8..db73bf53841bb9f6405468536763fa35674e0a5b 100644 (file)
@@ -565,7 +565,7 @@ expr_without_variable:
                T_LIST '(' { zend_do_list_init(TSRMLS_C); } assignment_list ')' '=' expr { zend_do_list_end(&$$, &$7 TSRMLS_CC); }
        |       variable '=' expr               { zend_check_writable_variable(&$1); zend_do_assign(&$$, &$1, &$3 TSRMLS_CC); }
        |       variable '=' '&' variable { zend_check_writable_variable(&$1); zend_do_end_variable_parse(BP_VAR_W, 1 TSRMLS_CC); zend_do_end_variable_parse(BP_VAR_W, 0 TSRMLS_CC); zend_do_assign_ref(&$$, &$1, &$4 TSRMLS_CC); }
-       |       variable '=' '&' T_NEW class_name_reference { zend_error(E_STRICT, "Assigning the return value of new by reference is deprecated");  zend_check_writable_variable(&$1); zend_do_extended_fcall_begin(TSRMLS_C); zend_do_begin_new_object(&$4, &$5 TSRMLS_CC); } ctor_arguments { zend_do_end_new_object(&$3, &$4, &$7 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C); zend_do_end_variable_parse(BP_VAR_W, 0 TSRMLS_CC); zend_do_assign_ref(&$$, &$1, &$3 TSRMLS_CC); }
+       |       variable '=' '&' T_NEW class_name_reference { zend_error(E_DEPRECATED, "Assigning the return value of new by reference is deprecated");  zend_check_writable_variable(&$1); zend_do_extended_fcall_begin(TSRMLS_C); zend_do_begin_new_object(&$4, &$5 TSRMLS_CC); } ctor_arguments { zend_do_end_new_object(&$3, &$4, &$7 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C); zend_do_end_variable_parse(BP_VAR_W, 0 TSRMLS_CC); zend_do_assign_ref(&$$, &$1, &$3 TSRMLS_CC); }
        |       T_NEW class_name_reference { zend_do_extended_fcall_begin(TSRMLS_C); zend_do_begin_new_object(&$1, &$2 TSRMLS_CC); } ctor_arguments { zend_do_end_new_object(&$$, &$1, &$4 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C);}
        |       T_CLONE expr { zend_do_clone(&$$, &$2 TSRMLS_CC); }
        |       variable T_PLUS_EQUAL expr      { zend_check_writable_variable(&$1); zend_do_end_variable_parse(BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_ADD, &$$, &$1, &$3 TSRMLS_CC); }
index bcc9127e7b4961b21080832fc03b71b99458ee9d..e58dc702db7f332708021b877ff64f6d3c24477a 100644 (file)
@@ -2067,7 +2067,7 @@ ZEND_VM_HELPER(zend_do_fcall_common_helper, ANY, ANY)
                        ZEND_VM_NEXT_OPCODE(); /* Never reached */
                }
                if (EX(function_state).function->common.fn_flags & ZEND_ACC_DEPRECATED) {
-                       zend_error(E_STRICT, "Function %s%s%s() is deprecated",
+                       zend_error(E_DEPRECATED, "Function %s%s%s() is deprecated",
                                EX(function_state).function->common.scope ? EX(function_state).function->common.scope->name : "",
                                EX(function_state).function->common.scope ? "::" : "",
                                EX(function_state).function->common.function_name);
index c0d1d043f913e9f286f273bc742b887b2122dee6..0fb064e13037fad7aaff1658b4dcb7b137f22030 100644 (file)
@@ -133,7 +133,7 @@ static int zend_do_fcall_common_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS)
                        ZEND_VM_NEXT_OPCODE(); /* Never reached */
                }
                if (EX(function_state).function->common.fn_flags & ZEND_ACC_DEPRECATED) {
-                       zend_error(E_STRICT, "Function %s%s%s() is deprecated",
+                       zend_error(E_DEPRECATED, "Function %s%s%s() is deprecated",
                                EX(function_state).function->common.scope ? EX(function_state).function->common.scope->name : "",
                                EX(function_state).function->common.scope ? "::" : "",
                                EX(function_state).function->common.function_name);
index 4637f35d2daaefbc2106e14c733be8a1c941b3fa..cc446e8e0a14987e18fc24249a22dbbd23e7c22a 100644 (file)
@@ -1241,7 +1241,7 @@ PHPAPI void php_mktime(INTERNAL_FUNCTION_PARAMETERS, int gmt)
        }
        /* Support for the deprecated is_dst parameter */
        if (dst != -1) {
-               php_error_docref(NULL TSRMLS_CC, E_STRICT, "The is_dst parameter is deprecated");
+               php_error_docref(NULL TSRMLS_CC, E_DEPRECATED, "The is_dst parameter is deprecated");
                if (gmt) {
                        /* GMT never uses DST */
                        if (dst == 1) {
index 0bdefa4f2c24244d6eb7eb1a1ca312e213b292f6..2151e38ee104378b2d323510f52366ca39409966 100644 (file)
@@ -1462,7 +1462,7 @@ PHP_FUNCTION(mysql_db_query)
        }
        
        if (MySG(trace_mode) || !strcasecmp(get_active_function_name(TSRMLS_C), "mysql")) {
-               php_error_docref(NULL TSRMLS_CC, E_NOTICE, "This function is deprecated; use mysql_query() instead.");
+               php_error_docref(NULL TSRMLS_CC, E_DEPRECATED, "This function is deprecated; use mysql_query() instead.");
        }
        
        php_mysql_do_query_general(query, mysql_link, id, db, MYSQL_STORE_RESULT, return_value TSRMLS_CC);
@@ -1762,7 +1762,7 @@ PHP_FUNCTION(mysql_escape_string)
        Z_TYPE_P(return_value) = IS_STRING;
 
        if (MySG(trace_mode)){
-               php_error_docref("function.mysql-real-escape-string" TSRMLS_CC, E_WARNING, "This function is deprecated; use mysql_real_escape_string() instead.");
+               php_error_docref("function.mysql-real-escape-string" TSRMLS_CC, E_DEPRECATED, "This function is deprecated; use mysql_real_escape_string() instead.");
        }
 }
 /* }}} */
index 6475116e3bec81e08e822c8b18c3da8021093a2d..72b20819130641d991dcc1857a0dbcec183b32bb 100644 (file)
@@ -4934,6 +4934,9 @@ PHP_FUNCTION(set_magic_quotes_runtime)
        if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &new_setting) == FAILURE) {
                RETURN_FALSE;
        }
+
+       php_error_docref(NULL TSRMLS_CC, E_DEPRECATED, "This function is deprecated and removed in PHP 6. See http://php.net/{migrate}#set_magic_quotes_runtime for details.");
+
        convert_to_boolean_ex(new_setting);
 
        PG(magic_quotes_runtime) = (zend_bool) Z_LVAL_PP(new_setting);
@@ -4945,6 +4948,7 @@ PHP_FUNCTION(set_magic_quotes_runtime)
    Get the current active configuration setting of magic_quotes_runtime */
 PHP_FUNCTION(get_magic_quotes_runtime)
 {
+       php_error_docref(NULL TSRMLS_CC, E_DEPRECATED, "This function is deprecated and removed in PHP 6. See http://php.net/{migrate}#get_magic_quotes_runtime for details.");
        RETURN_LONG(PG(magic_quotes_runtime));
 }
 /* }}} */
@@ -4953,6 +4957,7 @@ PHP_FUNCTION(get_magic_quotes_runtime)
    Get the current active configuration setting of magic_quotes_gpc */
 PHP_FUNCTION(get_magic_quotes_gpc)
 {
+       php_error_docref(NULL TSRMLS_CC, E_DEPRECATED, "This function is deprecated and removed in PHP 6. See http://php.net/{migrate}#get_magic_quotes_gpc for details.");
        RETURN_LONG(PG(magic_quotes_gpc));
 }
 /* }}} */
index 7db75d7a422f23064bedc9c708e088a3e6b58ae2..e4b668139a49209afe62139519506f8ae01cea46 100644 (file)
@@ -80,7 +80,7 @@ PHP_FUNCTION(dl)
                php_error_docref(NULL TSRMLS_CC, E_WARNING, "Not supported in multithreaded Web servers - use extension=%s in your php.ini", Z_STRVAL_P(filename));
                RETURN_FALSE;
 #else
-               php_error_docref(NULL TSRMLS_CC, E_STRICT, "dl() is deprecated - use extension=%s in your php.ini", Z_STRVAL_P(filename));
+               php_error_docref(NULL TSRMLS_CC, E_DEPRECATED, "dl() is deprecated - use extension=%s in your php.ini", Z_STRVAL_P(filename));
 #endif
        }
 
@@ -97,6 +97,8 @@ PHP_FUNCTION(dl)
 #define USING_ZTS 0
 #endif
 
+/* {{{ php_dl
+ */
 PHPAPI int php_load_extension(char *filename, int type, int start_now TSRMLS_DC) /* {{{ */
 {
        void *handle;
index 0fce31af2f6a4761c9557d1d66fd45c38c6c4ac7..5e6d06996aa26a247f9b9cadd38ef6f6ba3f6390 100644 (file)
@@ -1382,6 +1382,8 @@ PHPAPI int php_mkdir_ex(char *dir, long mode, int options TSRMLS_DC)
 {
        int ret;
 
+       php_error_docref(NULL TSRMLS_CC, E_DEPRECATED, "This function is deprecated; use php_stream_mkdir() instead.");
+
        if (PG(safe_mode) && (!php_checkuid(dir, NULL, CHECKUID_CHECK_FILE_AND_DIR))) {
                return -1;
        }
index 2cf1f43ebdc81aafd536d2f278aa12c294a75f5a..51505e413b17fb9e38c906d254310551f614aa9b 100644 (file)
@@ -4071,7 +4071,7 @@ PHP_FUNCTION(setlocale)
                cat = Z_LVAL_PP(pcategory);
        } else { /* FIXME: The following behaviour should be removed. */
                char *category;
-               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Passing locale category name as string is deprecated. Use the LC_* -constants instead");
+               php_error_docref(NULL TSRMLS_CC, E_DEPRECATED, "Passing locale category name as string is deprecated. Use the LC_* -constants instead");
                convert_to_string_ex(pcategory);
                category = Z_STRVAL_P(*pcategory);
 
index 4956f63aa6ec2b8f95473f73e8578199932a670e..4ae672635683efb7433037e7adad4d42e2b8b2c5 100644 (file)
@@ -1,5 +1,7 @@
 --TEST--
 various magic quotes tests
+--INI--
+error_reporting=14335
 --FILE--
 <?php
 
@@ -41,21 +43,45 @@ var_dump(file_get_contents($filename));
 echo "Done\n";
 ?>
 --EXPECTF--    
+
+Deprecated: get_magic_quotes_runtime(): This function is deprecated and will be removed in PHP 6. See http://php.net/%s#get_magic_quotes_runtime for details. in %s on line %d
 int(0)
+
+Deprecated: get_magic_quotes_runtime(): This function is deprecated and will be removed in PHP 6. See http://php.net/%s#get_magic_quotes_runtime for details. in %s on line %d
 int(0)
+
+Deprecated: set_magic_quotes_runtime(): This function is deprecated and will be removed in PHP 6. See http://php.net/%s#set_magic_quotes_runtime for details. in %s on line %d
 bool(true)
+
+Deprecated: get_magic_quotes_runtime(): This function is deprecated and will be removed in PHP 6. See http://php.net/%s#get_magic_quotes_runtime for details. in %s on line %d
 int(1)
+
+Deprecated: set_magic_quotes_runtime(): This function is deprecated and will be removed in PHP 6. See http://php.net/%s#set_magic_quotes_runtime for details. in %s on line %d
 bool(true)
+
+Deprecated: get_magic_quotes_runtime(): This function is deprecated and will be removed in PHP 6. See http://php.net/%s#get_magic_quotes_runtime for details. in %s on line %d
 int(1)
 string(30) "some\'content\'here\"and}there"
+
+Deprecated: set_magic_quotes_runtime(): This function is deprecated and will be removed in PHP 6. See http://php.net/%s#set_magic_quotes_runtime for details. in %s on line %d
 bool(true)
+
+Deprecated: get_magic_quotes_runtime(): This function is deprecated and will be removed in PHP 6. See http://php.net/%s#get_magic_quotes_runtime for details. in %s on line %d
 int(0)
 string(27) "some'content'here"and}there"
+
+Deprecated: set_magic_quotes_runtime(): This function is deprecated and will be removed in PHP 6. See http://php.net/%s#set_magic_quotes_runtime for details. in %s on line %d
 bool(true)
+
+Deprecated: get_magic_quotes_runtime(): This function is deprecated and will be removed in PHP 6. See http://php.net/%s#get_magic_quotes_runtime for details. in %s on line %d
 int(1)
 string(30) "some\'content\'here\"and}there"
+
+Deprecated: set_magic_quotes_runtime(): This function is deprecated and will be removed in PHP 6. See http://php.net/%s#set_magic_quotes_runtime for details. in %s on line %d
 bool(true)
 bool(false)
+
+Deprecated: get_magic_quotes_runtime(): This function is deprecated and will be removed in PHP 6. See http://php.net/%s#get_magic_quotes_runtime for details. in %s on line %d
 int(0)
 string(27) "some'content'here"and}there"
 Done
index 9db838d71760f17ed285ca1a8a21933fb5d4f562..59cc52f5f4151c7ad00c84f865fe5d7b06c26850 100644 (file)
@@ -1,7 +1,7 @@
 --TEST--
 Bug #31402 (unserialize() generates references when it should not)
 --INI--
-error_reporting=E_ALL&~E_STRICT
+error_reporting=E_ALL&~E_STRICT&~E_DEPRECATED
 --FILE--
 <?php 
 
index 02010e3eb67f806a561b3d9ed828dc68c54d4021..edbffd93876740689cbddaf82abba22052dc5304 100644 (file)
@@ -1,5 +1,7 @@
 --TEST--
 Test setlocale() function : error condition
+--INI--
+error_reporting=14335
 --SKIPIF--
 <?php
 if (substr(PHP_OS, 0, 3) == 'WIN') {
@@ -60,7 +62,7 @@ bool(false)
 
 -- Testing setlocale() function with invalid category --
 
-Warning: setlocale(): Passing locale category name as string is deprecated. Use the LC_* -constants instead in %s on line %d
+Deprecated: setlocale(): Passing locale category name as string is deprecated. Use the LC_* -constants instead in %s on line %d
 
 Warning: setlocale(): Invalid locale category name TEST, must be one of LC_ALL, LC_COLLATE, LC_CTYPE, LC_MONETARY, LC_NUMERIC, or LC_TIME in %s on line %d
 bool(false)
index c2d911dc975d340ae12b5a9446bd3b3534f0bfe1..60e488d0d32ff2f2cd9c1e5afaa8f30a5a1f1172 100644 (file)
@@ -843,6 +843,7 @@ static void php_error_cb(int type, const char *error_filename, const uint error_
                                /* fatal errors are real errors and cannot be made exceptions */
                                break;
                        case E_STRICT:
+                       case E_DEPRECATED:
                                /* for the sake of BC to old damaged code */
                                break;
                        case E_NOTICE:
@@ -892,6 +893,9 @@ static void php_error_cb(int type, const char *error_filename, const uint error_
                        case E_STRICT:
                                error_type_str = "Strict Standards";
                                break;
+                       case E_DEPRECATED:
+                               error_type_str = "Deprecated";
+                               break;
                        default:
                                error_type_str = "Unknown error";
                                break;
index 8ef8a71e0ff3221535af4f9868fbae7f4ab98826..ee7d3529a312cadbed0963151242d1b593d70243 100644 (file)
@@ -1,5 +1,7 @@
 --TEST--
 Confirm difference between assigning new directly and by reference.
+--INI--
+error_reporting=E_ALL | E_DEPRECATED
 --FILE--
 <?php
   echo "Compile-time strict error message should precede this.\n";
@@ -27,7 +29,7 @@ Confirm difference between assigning new directly and by reference.
   var_dump($f);
 ?>
 --EXPECTF--
-Strict Standards: Assigning the return value of new by reference is deprecated in %s on line 23
+Deprecated: Assigning the return value of new by reference is deprecated in %s on line 23
 Compile-time strict error message should precede this.
 $f initially points to the first object:
 object(Inc)#%d (1) {
index 86cac271fa6a9d75ac9c81bc0559790c4a150f41..7c6ec780ed7db232bb4f12f8d979779c75f778a5 100644 (file)
@@ -3,7 +3,7 @@ Bug #20175 (Static vars can't store ref to new instance)
 --SKIPIF--
 <?php if (version_compare(zend_version(),'2.0.0-dev','<')) die('skip ZE1 does not have static class members'); ?>
 --INI--
-error_reporting=4095
+error_reporting=E_ALL | E_STRICT | E_DEPRECATED
 --FILE--
 <?php
 print zend_version()."\n";
@@ -139,7 +139,7 @@ $oop_tester = new oop_test; // repeated.
 print $oop_tester->oop_static()."\n";
 ?>
 --EXPECTF--
-Strict Standards: Assigning the return value of new by reference is deprecated in %s.php on line %d
+Deprecated: Assigning the return value of new by reference is deprecated in %s.php on line %d
 %s
 foo_static()
 foo_global()
index b6842c7cf6a61bd57c9c39e9207aa98a83c94d12..ede6a371e53a872eeea4a870e9b782eccf92422e 100644 (file)
@@ -1,7 +1,7 @@
 --TEST--
 Bug #22231 (segfault when returning a global variable by reference)
 --INI--
-error_reporting=4095
+error_reporting=E_ALL | E_DEPRECATED
 --FILE--
 <?php
 class foo {
@@ -27,7 +27,7 @@ $foo = &foo();
 var_dump($foo->fubar);
 ?>
 --EXPECTF--
-Strict Standards: Assigning the return value of new by reference is deprecated in %s on line %d
+Deprecated: Assigning the return value of new by reference is deprecated in %s on line %d
 object(foo)#%d (1) {
   ["fubar"]=>
   string(5) "fubar"
index 450bbb577d938f73f9c82c76ca447e62b44197f4..fd717147d74a7b126650469f8336612285b6e14a 100644 (file)
@@ -1,7 +1,7 @@
 --TEST--
 Bug #22510 (segfault among complex references)
 --INI--
-error_reporting=4095
+error_reporting=E_ALL | E_DEPRECATED
 --FILE--
 <?php
 class foo 
@@ -91,7 +91,7 @@ $bar->instance->finalize();
 print "I'm alive!\n";
 ?>
 --EXPECTF--
-Strict Standards: Assigning the return value of new by reference is deprecated in %s on line %d
+Deprecated: Assigning the return value of new by reference is deprecated in %s on line %d
 ok1
 bar::run1
 foo::method1