summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Zend/tests/bug54585.phpt4
-rw-r--r--Zend/tests/bug67858.phpt2
-rw-r--r--Zend/tests/php_errormsg_misoptimization.phpt2
-rw-r--r--ext/hash/tests/hash_pbkdf2_error.phpt63
-rw-r--r--ext/shmop/tests/001.phpt8
-rw-r--r--ext/standard/tests/strings/implode.phpt11
-rw-r--r--main/main.c3
-rw-r--r--php.ini-development14
-rwxr-xr-xrun-tests.php2
-rw-r--r--tests/run-test/test005.phpt3
-rw-r--r--tests/run-test/test008.phpt3
-rw-r--r--tests/run-test/test008a.phpt3
12 files changed, 60 insertions, 58 deletions
diff --git a/Zend/tests/bug54585.phpt b/Zend/tests/bug54585.phpt
index 2ca11f3e6a..deabe55af8 100644
--- a/Zend/tests/bug54585.phpt
+++ b/Zend/tests/bug54585.phpt
@@ -5,11 +5,13 @@ track_errors=On
--FILE--
<?php
function testing($source) {
- unset($source[$cos]);
+ unset($source[$cos]);
}
testing($_GET);
echo "ok\n";
?>
--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 f0cfc74b0a..1186cd6a6f 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 c121c1021a..ae389db248 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 8c49d365d2..5636a532a4 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 74f53a0377..5b798cd5ba 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 36be0f395c..330ba2ff30 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--
<?php
echo implode(array())."\n";
@@ -12,12 +7,10 @@ echo implode('nothing', array())."\n";
echo implode(array('foo', 'bar', 'baz'))."\n";
echo implode(':', array('foo', 'bar', 'baz'))."\n";
echo implode(':', array('foo', array('bar', 'baz'), 'burp'))."\n";
-echo $php_errormsg."\n";
?>
--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 ab01757efa..a8674a5d11 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 bc4f7b529f..349434e782 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 a398610e11..32e68cad47 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 07ad7a659b..ef644a4fb1 100644
--- a/tests/run-test/test005.phpt
+++ b/tests/run-test/test005.phpt
@@ -4,6 +4,8 @@ Error message handling (with ZendOpcache)
<?php
extension_loaded("Zend Opcache") or die("skip Zend Opcache is not loaded");
?>
+--INI--
+track_errors=1
--FILE--
<?php
// If this test fails ask the developers of run-test.php
@@ -24,6 +26,7 @@ $error = 1 / $zero;
var_dump($php_errormsg);
?>
--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 7d95d8937b..41d22d8e71 100644
--- a/tests/run-test/test008.phpt
+++ b/tests/run-test/test008.phpt
@@ -4,6 +4,8 @@ Error message handling (without ZendOpcache)
<?php
!extension_loaded("Zend Opcache") or die("skip Zend Opcache is loaded");
?>
+--INI--
+track_errors=1
--FILE--
<?php
// If this test fails ask the developers of run-test.php
@@ -22,6 +24,7 @@ $error = 1 / 0;
var_dump($php_errormsg);
?>
--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 7d7649adc0..9814fa12f7 100644
--- a/tests/run-test/test008a.phpt
+++ b/tests/run-test/test008a.phpt
@@ -4,6 +4,8 @@ Error message handling (with ZendOpcache)
<?php
if (!extension_loaded("Zend Opcache")) die("skip Zend Opcache is not loaded");
?>
+--INI--
+track_errors=1
--FILE--
<?php
// If this test fails ask the developers of run-test.php
@@ -24,6 +26,7 @@ $error = 1 / $zero;
var_dump($php_errormsg);
?>
--EXPECTF--
+Deprecated: Directive 'track_errors' is deprecated in Unknown on line 0
string(1) "1"
string(5) "32767"
string(1) "0"