Skip to content

Commit 53f0904

Browse files
committed
Cleanup of remaning E_STRICT
1 parent 7cf651c commit 53f0904

28 files changed

+30
-48
lines changed

Zend/tests/bug33771.phpt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Bug #33771 (error_reporting falls to 0 when @ was used inside try/catch block)
33
--FILE--
44
<?php
55

6-
error_reporting(E_ALL | E_STRICT);
6+
error_reporting(E_ALL);
77

88
var_dump(error_reporting());
99

@@ -14,7 +14,7 @@ function make_exception()
1414

1515
function make_exception_and_change_err_reporting()
1616
{
17-
error_reporting(E_ALL & ~E_STRICT);
17+
error_reporting(E_ALL & ~E_NOTICE);
1818
throw new Exception();
1919
}
2020

@@ -36,5 +36,5 @@ echo "Done\n";
3636
--EXPECT--
3737
int(32767)
3838
int(32767)
39-
int(30719)
39+
int(32759)
4040
Done

Zend/tests/bug52160.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
--TEST--
2-
Bug #52160 (Invalid E_STRICT redefined constructor error)
2+
Bug #52160 (Invalid E_DEPRECATED redefined constructor error)
33
--FILE--
44
<?php
55

Zend/tests/bug62956.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
--TEST--
2-
Bug #62956: "incompatible" signatures for private methods should not cause E_STRICT
2+
Bug #62956: "incompatible" signatures for private methods should not cause E_WARNING
33
--FILE--
44
<?php
55
class Base

Zend/tests/bug64988.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
--TEST--
2-
Bug #64988 (Class loading order affects E_STRICT warning)
2+
Bug #64988 (Class loading order affects E_WARNING warning)
33
--FILE--
44
<?php
55
abstract class Base1 {

Zend/tests/bug67436/bug67436_nohandler.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
--TEST--
2-
bug67436: E_STRICT instead of custom error handler
2+
bug67436: E_WARNING instead of custom error handler
33
--FILE--
44
<?php
55

Zend/tests/error_reporting02.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ testing @ and error_reporting - 2
33
--FILE--
44
<?php
55

6-
error_reporting(E_ALL);
6+
error_reporting(E_ALL & ~E_DEPRECATED);
77

88
function foo($arg) {
99
}
1010

1111
function bar() {
12-
error_reporting(E_ALL|E_STRICT);
12+
error_reporting(E_ALL);
1313
throw new Exception("test");
1414
}
1515

Zend/tests/error_reporting03.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ testing @ and error_reporting - 3
33
--FILE--
44
<?php
55

6-
error_reporting(E_ALL);
6+
error_reporting(E_ALL & ~E_DEPRECATED);
77

88
function foo($arg) {
99
echo @$nonex_foo;
@@ -16,7 +16,7 @@ function bar() {
1616

1717
function foo1() {
1818
echo $undef1;
19-
error_reporting(E_ALL|E_STRICT);
19+
error_reporting(E_ALL);
2020
echo $undef2;
2121
}
2222

Zend/tests/error_reporting04.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ testing @ and error_reporting - 4
33
--FILE--
44
<?php
55

6-
error_reporting(E_ALL);
6+
error_reporting(E_ALL & ~E_DEPRECATED);
77

88
function foo() {
99
echo $undef;
10-
error_reporting(E_ALL|E_STRICT);
10+
error_reporting(E_ALL);
1111
}
1212

1313

Zend/tests/error_reporting08.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ testing @ and error_reporting - 8
33
--FILE--
44
<?php
55

6-
error_reporting(E_ALL);
6+
error_reporting(E_ALL & ~E_DEPRECATED);
77

88
function foo1($arg) {
99
}
@@ -12,7 +12,7 @@ function foo2($arg) {
1212
}
1313

1414
function foo3() {
15-
error_reporting(E_ALL|E_STRICT);
15+
error_reporting(E_ALL);
1616
echo $undef3;
1717
throw new Exception("test");
1818
}

Zend/tests/error_reporting09.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ testing @ and error_reporting - 9
33
--FILE--
44
<?php
55

6-
error_reporting(E_ALL);
6+
error_reporting(E_ALL & ~E_DEPRECATED);
77

88
function bar() {
99
echo @$blah;
@@ -12,7 +12,7 @@ function bar() {
1212

1313
function foo() {
1414
echo @$undef;
15-
error_reporting(E_ALL|E_STRICT);
15+
error_reporting(E_ALL);
1616
echo $blah;
1717
return bar();
1818
}

Zend/tests/exception_004.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ Throwing exception using a class that isn't derived from the Exception base clas
33
--FILE--
44
<?php
55

6-
error_reporting(E_ALL|E_STRICT);
7-
86
class Foo { }
97

108
try {

ext/pdo/pdo_stmt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -764,7 +764,7 @@ static int make_callable_ex(pdo_stmt_t *stmt, zval *callable, zend_fcall_info *
764764
return 0;
765765
}
766766
if (is_callable_error) {
767-
/* Possible E_STRICT error message */
767+
/* Possible error message */
768768
efree(is_callable_error);
769769
}
770770

ext/pdo_mysql/tests/pdo_mysql_subclass.phpt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ MySQLPDOTest::skip();
1010
<?php
1111
require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc');
1212

13-
// No silly strict mode warnings, please!
14-
error_reporting(E_ALL^E_STRICT);
15-
ini_set('display_errors', false);
16-
1713
try {
1814

1915
class MyPDO extends PDO {
@@ -23,9 +19,9 @@ MySQLPDOTest::skip();
2319
return call_user_func_array(array($this, 'parent::__construct'), func_get_args());
2420
}
2521

26-
public function exec() {
22+
public function exec($statement) {
2723
$this->protocol();
28-
return call_user_func_array(array($this, 'parent::exec'), func_get_args());
24+
return parent::exec($statement);
2925
}
3026

3127
public function query() {

ext/pdo_pgsql/tests/bug72294.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class PHPUnit_Framework_TestResult
7474

7575
$oldErrorHandler = set_error_handler(
7676
'handleError',
77-
E_ALL | E_STRICT
77+
E_ALL
7878
);
7979

8080
try {

ext/phar/util.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -934,7 +934,7 @@ int phar_free_alias(phar_archive_data *phar, char *alias, size_t alias_len) /* {
934934
return FAILURE;
935935
}
936936

937-
/* this archive has no open references, so emit an E_STRICT and remove it */
937+
/* this archive has no open references, so emit a notice and remove it */
938938
if (zend_hash_str_del(&(PHAR_G(phar_fname_map)), phar->fname, phar->fname_len) != SUCCESS) {
939939
return FAILURE;
940940
}

ext/soap/tests/bugs/bug46427.phpt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ Bug #46427 (SoapClient() stumbles over its "stream_context" parameter)
44
<?php require_once('skipif.inc'); ?>
55
--FILE--
66
<?php
7-
error_reporting(E_ALL|E_STRICT);
87

98
function getSoapClient_1() {
109
$ctx = stream_context_create();

ext/standard/tests/general_functions/parse_ini_booleans.data

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ foo = E_ALL E_NOTICE
33
error_reporting = E_ALL
44
error_reporting1 = E_COMPILE_ERROR|E_RECOVERABLE_ERROR |E_ERROR|E_CORE_ERROR
55
error_reporting2 = E_ALL&~E_NOTICE
6-
error_reporting3 = E_ALL & ~E_NOTICE
7-
error_reporting4 = E_ALL & ~E_NOTICE | E_STRICT
6+
error_reporting3 = E_ALL & ~E_NOTICE
7+
error_reporting4 = E_ALL & ~E_NOTICE | E_PARSE
88

99
['true or false']
1010
bool_true = true

ext/standard/tests/mail/mail_basic_alt1-win32.phpt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ max_execution_time = 120
1919
* Alias to functions:
2020
*/
2121

22-
error_reporting(E_ALL & ~E_STRICT);
2322
ini_set("SMTP", "localhost");
2423
ini_set("smtp_port", 25);
2524
ini_set("sendmail_from", "user@example.com");

ext/standard/tests/mail/mail_basic_alt2-win32.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ max_execution_time = 120
1818
* Alias to functions:
1919
*/
2020

21-
error_reporting(E_ALL & ~E_STRICT);
22-
2321
echo "*** Testing mail() : basic functionality ***\n";
2422
require_once(__DIR__.'/mail_include.inc');
2523
$subject_prefix = "!**PHPT**!";

ext/standard/tests/mail/mail_basic_alt3-win32.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ max_execution_time = 120
1818
* Alias to functions:
1919
*/
2020

21-
error_reporting(E_ALL & ~E_STRICT);
22-
2321
echo "*** Testing mail() : basic functionality ***\n";
2422
require_once(__DIR__.'/mail_include.inc');
2523
$subject_prefix = "!**PHPT**!";

ext/standard/tests/mail/mail_basic_alt4-win32.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ max_execution_time = 120
1818
* Alias to functions:
1919
*/
2020

21-
error_reporting(E_ALL & ~E_STRICT);
22-
2321
echo "*** Testing mail() : basic functionality ***\n";
2422
require_once(__DIR__.'/mail_include.inc');
2523
$subject_prefix = "!**PHPT**!";

ext/standard/tests/mail/mail_variation_alt1-win32.phpt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ max_execution_time = 120
1818
* Alias to functions:
1919
*/
2020

21-
error_reporting(E_ALL & ~E_STRICT);
2221
ini_set("SMTP", "localhost");
2322
ini_set("smtp_port", 2525);
2423
ini_set("sendmail_from", "user@example.com");

ext/standard/tests/mail/mail_variation_alt2-win32.phpt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ max_execution_time = 120
1818
* Alias to functions:
1919
*/
2020

21-
error_reporting(E_ALL & ~E_STRICT);
2221
ini_set("SMTP", "localplace");
2322
ini_set("smtp_port", 25);
2423
ini_set("sendmail_from", "user@example.com");

ext/standard/tests/mail/mail_variation_alt3-win32.phpt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ max_execution_time = 120
1818
* Alias to functions:
1919
*/
2020

21-
error_reporting(E_ALL & ~E_STRICT);
2221
ini_set("SMTP", "localhost");
2322
ini_set("smtp_port", 25);
2423

ext/zip/examples/get_set_comments.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<?php
2-
error_reporting(E_ALL|E_STRICT);
32

43
copy('test_with_comment.zip', 't.zip');
54
$z = new ZipArchive;

run-tests.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ function main()
238238
'open_basedir=',
239239
'disable_functions=',
240240
'output_buffering=Off',
241-
'error_reporting=' . (E_ALL | E_STRICT),
241+
'error_reporting=' . E_ALL,
242242
'display_errors=1',
243243
'display_startup_errors=1',
244244
'log_errors=0',
@@ -1623,7 +1623,7 @@ function run_all_tests_parallel($test_files, $env, $redir_tested) {
16231623
'E_USER_ERROR',
16241624
'E_USER_WARNING',
16251625
'E_USER_NOTICE',
1626-
'E_STRICT',
1626+
'E_STRICT', // TODO Cleanup when removed from Zend Engine.
16271627
'E_RECOVERABLE_ERROR',
16281628
'E_USER_DEPRECATED'
16291629
];

tests/func/011.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
--TEST--
22
Test bitwise AND, OR, XOR, NOT and logical NOT in INI via error_reporting
33
--INI--
4-
error_reporting = E_ALL & E_NOTICE | E_STRICT ^ E_DEPRECATED & ~E_WARNING | !E_ERROR
4+
error_reporting = E_ALL & E_NOTICE | E_PARSE ^ E_DEPRECATED & ~E_WARNING | !E_ERROR
55
--FILE--
66
<?php
77
echo ini_get('error_reporting');
88
?>
99
--EXPECT--
10-
10248
10+
8204

tests/func/bug64523.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
--TEST--
22
Bug #64523: XOR not parsed in INI
33
--INI--
4-
error_reporting = E_ALL ^ E_NOTICE ^ E_STRICT ^ E_DEPRECATED
4+
error_reporting = E_ALL ^ E_NOTICE ^ E_WARNING ^ E_DEPRECATED
55
--FILE--
66
<?php
77
echo ini_get('error_reporting');
88
?>
99
--EXPECT--
10-
22519
10+
24565

0 commit comments

Comments
 (0)