diff --git a/Zend/tests/bug54585.phpt b/Zend/tests/bug54585.phpt index 2ca11f3e6a6..deabe55af84 100644 --- a/Zend/tests/bug54585.phpt +++ b/Zend/tests/bug54585.phpt @@ -5,11 +5,13 @@ track_errors=On --FILE-- --EXPECTF-- +Deprecated: Directive 'track_errors' is deprecated in Unknown on line 0 + Notice: Undefined variable: cos in %sbug54585.php on line 3 ok diff --git a/Zend/tests/bug67858.phpt b/Zend/tests/bug67858.phpt index f0cfc74b0a9..1186cd6a6fb 100644 --- a/Zend/tests/bug67858.phpt +++ b/Zend/tests/bug67858.phpt @@ -15,5 +15,7 @@ f(); ?> --EXPECTF-- +Deprecated: Directive 'track_errors' is deprecated in Unknown on line 0 + Notice: Undefined variable: var in %s on line %d string(23) "Undefined variable: var" diff --git a/Zend/tests/php_errormsg_misoptimization.phpt b/Zend/tests/php_errormsg_misoptimization.phpt index c121c1021ac..ae389db2487 100644 --- a/Zend/tests/php_errormsg_misoptimization.phpt +++ b/Zend/tests/php_errormsg_misoptimization.phpt @@ -14,6 +14,8 @@ test(); ?> --EXPECTF-- +Deprecated: Directive 'track_errors' is deprecated in Unknown on line 0 + Notice: Undefined variable: undef in %s on line %d Warning: A non-numeric value encountered in %s on line %d diff --git a/ext/hash/tests/hash_pbkdf2_error.phpt b/ext/hash/tests/hash_pbkdf2_error.phpt index 8c49d365d21..5636a532a4b 100644 --- a/ext/hash/tests/hash_pbkdf2_error.phpt +++ b/ext/hash/tests/hash_pbkdf2_error.phpt @@ -15,72 +15,71 @@ $password = 'password'; $salt = 'salt'; echo "\n-- Testing hash_pbkdf2() function with less than expected no. of arguments --\n"; -var_dump(@hash_pbkdf2()); -echo $php_errormsg . "\n"; -var_dump(@hash_pbkdf2('md5')); -echo $php_errormsg . "\n"; -var_dump(@hash_pbkdf2('md5', $password)); -echo $php_errormsg . "\n"; -var_dump(@hash_pbkdf2('md5', $password, $salt)); -echo $php_errormsg . "\n"; +var_dump(hash_pbkdf2()); +var_dump(hash_pbkdf2('md5')); +var_dump(hash_pbkdf2('md5', $password)); +var_dump(hash_pbkdf2('md5', $password, $salt)); echo "\n-- Testing hash_pbkdf2() function with more than expected no. of arguments --\n"; -var_dump(@hash_pbkdf2('md5', $password, $salt, 10, 10, true, 'extra arg')); -echo $php_errormsg . "\n"; +var_dump(hash_pbkdf2('md5', $password, $salt, 10, 10, true, 'extra arg')); echo "\n-- Testing hash_pbkdf2() function with invalid hash algorithm --\n"; -var_dump(@hash_pbkdf2('foo', $password, $salt, 1)); -echo $php_errormsg . "\n"; +var_dump(hash_pbkdf2('foo', $password, $salt, 1)); echo "\n-- Testing hash_pbkdf2() function with non-cryptographic hash algorithm --\n"; -var_dump(@hash_pbkdf2('crc32', $password, $salt, 1)); -echo $php_errormsg . "\n"; +var_dump(hash_pbkdf2('crc32', $password, $salt, 1)); echo "\n-- Testing hash_pbkdf2() function with invalid iterations --\n"; -var_dump(@hash_pbkdf2('md5', $password, $salt, 0)); -echo $php_errormsg . "\n"; -var_dump(@hash_pbkdf2('md5', $password, $salt, -1)); -echo $php_errormsg . "\n"; +var_dump(hash_pbkdf2('md5', $password, $salt, 0)); +var_dump(hash_pbkdf2('md5', $password, $salt, -1)); echo "\n-- Testing hash_pbkdf2() function with invalid length --\n"; -var_dump(@hash_pbkdf2('md5', $password, $salt, 1, -1)); -echo $php_errormsg . "\n\n"; +var_dump(hash_pbkdf2('md5', $password, $salt, 1, -1)); ?> ===Done=== ---EXPECT-- +--EXPECTF-- *** Testing hash_pbkdf2() : error conditions *** -- Testing hash_pbkdf2() function with less than expected no. of arguments -- + +Warning: hash_pbkdf2() expects at least 4 parameters, 0 given in %s on line %d NULL -hash_pbkdf2() expects at least 4 parameters, 0 given + +Warning: hash_pbkdf2() expects at least 4 parameters, 1 given in %s on line %d NULL -hash_pbkdf2() expects at least 4 parameters, 1 given + +Warning: hash_pbkdf2() expects at least 4 parameters, 2 given in %s on line %d NULL -hash_pbkdf2() expects at least 4 parameters, 2 given + +Warning: hash_pbkdf2() expects at least 4 parameters, 3 given in %s on line %d NULL -hash_pbkdf2() expects at least 4 parameters, 3 given -- Testing hash_pbkdf2() function with more than expected no. of arguments -- + +Warning: hash_pbkdf2() expects at most 6 parameters, 7 given in %s on line %d NULL -hash_pbkdf2() expects at most 6 parameters, 7 given -- Testing hash_pbkdf2() function with invalid hash algorithm -- + +Warning: hash_pbkdf2(): Unknown hashing algorithm: foo in %s on line %d bool(false) -hash_pbkdf2(): Unknown hashing algorithm: foo -- Testing hash_pbkdf2() function with non-cryptographic hash algorithm -- + +Warning: hash_pbkdf2(): Non-cryptographic hashing algorithm: crc32 in %s on line %d bool(false) -hash_pbkdf2(): Non-cryptographic hashing algorithm: crc32 -- Testing hash_pbkdf2() function with invalid iterations -- + +Warning: hash_pbkdf2(): Iterations must be a positive integer: 0 in %s on line %d bool(false) -hash_pbkdf2(): Iterations must be a positive integer: 0 + +Warning: hash_pbkdf2(): Iterations must be a positive integer: -1 in %s on line %d bool(false) -hash_pbkdf2(): Iterations must be a positive integer: -1 -- Testing hash_pbkdf2() function with invalid length -- -bool(false) -hash_pbkdf2(): Length must be greater than or equal to 0: -1 +Warning: hash_pbkdf2(): Length must be greater than or equal to 0: -1 in %s on line %d +bool(false) ===Done=== diff --git a/ext/shmop/tests/001.phpt b/ext/shmop/tests/001.phpt index 74f53a03772..5b798cd5ba4 100644 --- a/ext/shmop/tests/001.phpt +++ b/ext/shmop/tests/001.phpt @@ -45,8 +45,7 @@ shmop extension test echo "data in memory is: " . shmop_read($shm_id, 0, $written) . "\n"; /* try to append data to the shared memory segment, this should fail */ - @shmop_write($shm_id, $write_d1, $written); - echo $php_errormsg . "\n"; + shmop_write($shm_id, $write_d1, $written); shmop_close($shm_id); @@ -77,14 +76,15 @@ shmop extension test shmop_close($shm_id); ?> ---EXPECT-- +--EXPECTF-- shm open for create: ok shm size is: 1024 shm write test #1: ok data in memory is: test #1 of the shmop() extension shm open for read only: ok data in memory is: test #1 of the shmop() extension -shmop_write(): trying to write to a read only segment + +Warning: shmop_write(): trying to write to a read only segment in %s on line %d shm open for read only: ok shm write test #1: ok data in memory is: test #1 of the shmop() extensiontest #2 append data to shared memory segment diff --git a/ext/standard/tests/strings/implode.phpt b/ext/standard/tests/strings/implode.phpt index 36be0f395cf..330ba2ff306 100644 --- a/ext/standard/tests/strings/implode.phpt +++ b/ext/standard/tests/strings/implode.phpt @@ -1,10 +1,5 @@ --TEST-- implode() function ---INI-- -error_reporting=2047 -log_errors=0 -display_errors=0 -track_errors=1 --FILE-- --EXPECTF-- - - foobarbaz foo:bar:baz + +Notice: Array to string conversion in %s on line %d foo:Array:burp -Array to string conversion diff --git a/main/main.c b/main/main.c index ab01757efa4..a8674a5d117 100644 --- a/main/main.c +++ b/main/main.c @@ -2311,8 +2311,9 @@ int php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_mod } directives[2] = { { E_DEPRECATED, - "Directive '%s' is deprecated in PHP 5.3 and greater", + "Directive '%s' is deprecated", { + "track_errors", NULL } }, diff --git a/php.ini-development b/php.ini-development index bc4f7b529f6..349434e7824 100644 --- a/php.ini-development +++ b/php.ini-development @@ -153,11 +153,6 @@ ; Development Value: Off ; Production Value: Off -; track_errors -; Default Value: Off -; Development Value: On -; Production Value: Off - ; variables_order ; Default Value: "EGPCS" ; Development Value: "GPCS" @@ -522,14 +517,13 @@ report_memleaks = On ; This setting is on by default. ;report_zend_debug = 0 -; Store the last error/warning message in $php_errormsg (boolean). Setting this value -; to On can assist in debugging and is appropriate for development servers. It should -; however be disabled on production servers. +; Store the last error/warning message in $php_errormsg (boolean). +; This directive is DEPRECATED. ; Default Value: Off -; Development Value: On +; Development Value: Off ; Production Value: Off ; http://php.net/track-errors -track_errors = On +track_errors = Off ; Turn off normal error reporting and emit XML-RPC error XML ; http://php.net/xmlrpc-errors diff --git a/run-tests.php b/run-tests.php index a398610e11c..32e68cad47c 100755 --- a/run-tests.php +++ b/run-tests.php @@ -217,7 +217,7 @@ $ini_overwrites = array( 'display_startup_errors=1', 'log_errors=0', 'html_errors=0', - 'track_errors=1', + 'track_errors=0', 'report_memleaks=1', 'report_zend_debug=0', 'docref_root=', diff --git a/tests/run-test/test005.phpt b/tests/run-test/test005.phpt index 07ad7a659b1..ef644a4fb15 100644 --- a/tests/run-test/test005.phpt +++ b/tests/run-test/test005.phpt @@ -4,6 +4,8 @@ Error message handling (with ZendOpcache) +--INI-- +track_errors=1 --FILE-- --EXPECTF-- +Deprecated: Directive 'track_errors' is deprecated in Unknown on line 0 string(1) "1" string(5) "32767" string(1) "0" diff --git a/tests/run-test/test008.phpt b/tests/run-test/test008.phpt index 7d95d8937b4..41d22d8e718 100644 --- a/tests/run-test/test008.phpt +++ b/tests/run-test/test008.phpt @@ -4,6 +4,8 @@ Error message handling (without ZendOpcache) +--INI-- +track_errors=1 --FILE-- --EXPECTF-- +Deprecated: Directive 'track_errors' is deprecated in Unknown on line 0 string(1) "1" string(5) "32767" string(1) "0" diff --git a/tests/run-test/test008a.phpt b/tests/run-test/test008a.phpt index 7d7649adc01..9814fa12f78 100644 --- a/tests/run-test/test008a.phpt +++ b/tests/run-test/test008a.phpt @@ -4,6 +4,8 @@ Error message handling (with ZendOpcache) +--INI-- +track_errors=1 --FILE-- --EXPECTF-- +Deprecated: Directive 'track_errors' is deprecated in Unknown on line 0 string(1) "1" string(5) "32767" string(1) "0"