diff options
author | George Peter Banyard <girgias@php.net> | 2019-07-14 03:45:31 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-07-23 11:27:23 +0200 |
commit | 6d6d954d0d28f488f743e6c9d0cd9ab01e1c4e41 (patch) | |
tree | 60cbb3987b5dadbac96ca4a372045d2f509e77f3 | |
parent | a07e85f93fe446975f84948cfe905e2ec1c4db4a (diff) | |
download | php-git-6d6d954d0d28f488f743e6c9d0cd9ab01e1c4e41.tar.gz |
Cleanup of remaining E_STRICT in tests
28 files changed, 30 insertions, 48 deletions
diff --git a/Zend/tests/bug33771.phpt b/Zend/tests/bug33771.phpt index 0f3dd9815f..6eea49edbe 100644 --- a/Zend/tests/bug33771.phpt +++ b/Zend/tests/bug33771.phpt @@ -3,7 +3,7 @@ Bug #33771 (error_reporting falls to 0 when @ was used inside try/catch block) --FILE-- <?php -error_reporting(E_ALL | E_STRICT); +error_reporting(E_ALL); var_dump(error_reporting()); @@ -14,7 +14,7 @@ function make_exception() function make_exception_and_change_err_reporting() { - error_reporting(E_ALL & ~E_STRICT); + error_reporting(E_ALL & ~E_NOTICE); throw new Exception(); } @@ -36,5 +36,5 @@ echo "Done\n"; --EXPECT-- int(32767) int(32767) -int(30719) +int(32759) Done diff --git a/Zend/tests/bug52160.phpt b/Zend/tests/bug52160.phpt index a0e5a9d7ae..f0a57000e0 100644 --- a/Zend/tests/bug52160.phpt +++ b/Zend/tests/bug52160.phpt @@ -1,5 +1,5 @@ --TEST-- -Bug #52160 (Invalid E_STRICT redefined constructor error) +Bug #52160 (Invalid E_DEPRECATED redefined constructor error) --FILE-- <?php diff --git a/Zend/tests/bug62956.phpt b/Zend/tests/bug62956.phpt index c8694d5bea..fab180b4c3 100644 --- a/Zend/tests/bug62956.phpt +++ b/Zend/tests/bug62956.phpt @@ -1,5 +1,5 @@ --TEST-- -Bug #62956: "incompatible" signatures for private methods should not cause E_STRICT +Bug #62956: "incompatible" signatures for private methods should not cause E_WARNING --FILE-- <?php class Base diff --git a/Zend/tests/bug64988.phpt b/Zend/tests/bug64988.phpt index 671d69de3b..41d89cc54c 100644 --- a/Zend/tests/bug64988.phpt +++ b/Zend/tests/bug64988.phpt @@ -1,5 +1,5 @@ --TEST-- -Bug #64988 (Class loading order affects E_STRICT warning) +Bug #64988 (Class loading order affects E_WARNING warning) --FILE-- <?php abstract class Base1 { diff --git a/Zend/tests/bug67436/bug67436_nohandler.phpt b/Zend/tests/bug67436/bug67436_nohandler.phpt index 74ea394f5d..a155ccc842 100644 --- a/Zend/tests/bug67436/bug67436_nohandler.phpt +++ b/Zend/tests/bug67436/bug67436_nohandler.phpt @@ -1,5 +1,5 @@ --TEST-- -bug67436: E_STRICT instead of custom error handler +bug67436: E_WARNING instead of custom error handler --FILE-- <?php diff --git a/Zend/tests/error_reporting02.phpt b/Zend/tests/error_reporting02.phpt index 6ceb8deaa3..c76c5b54c8 100644 --- a/Zend/tests/error_reporting02.phpt +++ b/Zend/tests/error_reporting02.phpt @@ -3,13 +3,13 @@ testing @ and error_reporting - 2 --FILE-- <?php -error_reporting(E_ALL); +error_reporting(E_ALL & ~E_DEPRECATED); function foo($arg) { } function bar() { - error_reporting(E_ALL|E_STRICT); + error_reporting(E_ALL); throw new Exception("test"); } diff --git a/Zend/tests/error_reporting03.phpt b/Zend/tests/error_reporting03.phpt index 959a29b557..f344e9557b 100644 --- a/Zend/tests/error_reporting03.phpt +++ b/Zend/tests/error_reporting03.phpt @@ -3,7 +3,7 @@ testing @ and error_reporting - 3 --FILE-- <?php -error_reporting(E_ALL); +error_reporting(E_ALL & ~E_DEPRECATED); function foo($arg) { echo @$nonex_foo; @@ -16,7 +16,7 @@ function bar() { function foo1() { echo $undef1; - error_reporting(E_ALL|E_STRICT); + error_reporting(E_ALL); echo $undef2; } diff --git a/Zend/tests/error_reporting04.phpt b/Zend/tests/error_reporting04.phpt index 295a3a4d40..5b476cdf7f 100644 --- a/Zend/tests/error_reporting04.phpt +++ b/Zend/tests/error_reporting04.phpt @@ -3,11 +3,11 @@ testing @ and error_reporting - 4 --FILE-- <?php -error_reporting(E_ALL); +error_reporting(E_ALL & ~E_DEPRECATED); function foo() { echo $undef; - error_reporting(E_ALL|E_STRICT); + error_reporting(E_ALL); } diff --git a/Zend/tests/error_reporting08.phpt b/Zend/tests/error_reporting08.phpt index 13d32ca4bc..32cb6b8d16 100644 --- a/Zend/tests/error_reporting08.phpt +++ b/Zend/tests/error_reporting08.phpt @@ -3,7 +3,7 @@ testing @ and error_reporting - 8 --FILE-- <?php -error_reporting(E_ALL); +error_reporting(E_ALL & ~E_DEPRECATED); function foo1($arg) { } @@ -12,7 +12,7 @@ function foo2($arg) { } function foo3() { - error_reporting(E_ALL|E_STRICT); + error_reporting(E_ALL); echo $undef3; throw new Exception("test"); } diff --git a/Zend/tests/error_reporting09.phpt b/Zend/tests/error_reporting09.phpt index a3c254d94d..3d723f36c0 100644 --- a/Zend/tests/error_reporting09.phpt +++ b/Zend/tests/error_reporting09.phpt @@ -3,7 +3,7 @@ testing @ and error_reporting - 9 --FILE-- <?php -error_reporting(E_ALL); +error_reporting(E_ALL & ~E_DEPRECATED); function bar() { echo @$blah; @@ -12,7 +12,7 @@ function bar() { function foo() { echo @$undef; - error_reporting(E_ALL|E_STRICT); + error_reporting(E_ALL); echo $blah; return bar(); } diff --git a/Zend/tests/exception_004.phpt b/Zend/tests/exception_004.phpt index 29288e25ac..d9ffc748a4 100644 --- a/Zend/tests/exception_004.phpt +++ b/Zend/tests/exception_004.phpt @@ -3,8 +3,6 @@ Throwing exception using a class that isn't derived from the Exception base clas --FILE-- <?php -error_reporting(E_ALL|E_STRICT); - class Foo { } try { diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c index 1fc114ccf9..52d38ca194 100644 --- a/ext/pdo/pdo_stmt.c +++ b/ext/pdo/pdo_stmt.c @@ -764,7 +764,7 @@ static int make_callable_ex(pdo_stmt_t *stmt, zval *callable, zend_fcall_info * return 0; } if (is_callable_error) { - /* Possible E_STRICT error message */ + /* Possible error message */ efree(is_callable_error); } diff --git a/ext/pdo_mysql/tests/pdo_mysql_subclass.phpt b/ext/pdo_mysql/tests/pdo_mysql_subclass.phpt index 915df7d69f..604a13bdb3 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_subclass.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_subclass.phpt @@ -10,10 +10,6 @@ MySQLPDOTest::skip(); <?php require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); - // No silly strict mode warnings, please! - error_reporting(E_ALL^E_STRICT); - ini_set('display_errors', false); - try { class MyPDO extends PDO { @@ -23,9 +19,9 @@ MySQLPDOTest::skip(); return call_user_func_array(array($this, 'parent::__construct'), func_get_args()); } - public function exec() { + public function exec($statement) { $this->protocol(); - return call_user_func_array(array($this, 'parent::exec'), func_get_args()); + return parent::exec($statement); } public function query() { diff --git a/ext/pdo_pgsql/tests/bug72294.phpt b/ext/pdo_pgsql/tests/bug72294.phpt index 9ef4a424bb..bd5124ff17 100644 --- a/ext/pdo_pgsql/tests/bug72294.phpt +++ b/ext/pdo_pgsql/tests/bug72294.phpt @@ -74,7 +74,7 @@ class PHPUnit_Framework_TestResult $oldErrorHandler = set_error_handler( 'handleError', - E_ALL | E_STRICT + E_ALL ); try { diff --git a/ext/phar/util.c b/ext/phar/util.c index 59a6cd7c88..53982b0f85 100644 --- a/ext/phar/util.c +++ b/ext/phar/util.c @@ -934,7 +934,7 @@ int phar_free_alias(phar_archive_data *phar, char *alias, size_t alias_len) /* { return FAILURE; } - /* this archive has no open references, so emit an E_STRICT and remove it */ + /* this archive has no open references, so emit a notice and remove it */ if (zend_hash_str_del(&(PHAR_G(phar_fname_map)), phar->fname, phar->fname_len) != SUCCESS) { return FAILURE; } diff --git a/ext/soap/tests/bugs/bug46427.phpt b/ext/soap/tests/bugs/bug46427.phpt index a49071e21a..38d53518b8 100644 --- a/ext/soap/tests/bugs/bug46427.phpt +++ b/ext/soap/tests/bugs/bug46427.phpt @@ -4,7 +4,6 @@ Bug #46427 (SoapClient() stumbles over its "stream_context" parameter) <?php require_once('skipif.inc'); ?> --FILE-- <?php -error_reporting(E_ALL|E_STRICT); function getSoapClient_1() { $ctx = stream_context_create(); diff --git a/ext/standard/tests/general_functions/parse_ini_booleans.data b/ext/standard/tests/general_functions/parse_ini_booleans.data index d408577ea4..f29e32a92e 100644 --- a/ext/standard/tests/general_functions/parse_ini_booleans.data +++ b/ext/standard/tests/general_functions/parse_ini_booleans.data @@ -3,8 +3,8 @@ foo = E_ALL E_NOTICE error_reporting = E_ALL error_reporting1 = E_COMPILE_ERROR|E_RECOVERABLE_ERROR |E_ERROR|E_CORE_ERROR error_reporting2 = E_ALL&~E_NOTICE -error_reporting3 = E_ALL & ~E_NOTICE -error_reporting4 = E_ALL & ~E_NOTICE | E_STRICT +error_reporting3 = E_ALL & ~E_NOTICE +error_reporting4 = E_ALL & ~E_NOTICE | E_PARSE ['true or false'] bool_true = true diff --git a/ext/standard/tests/mail/mail_basic_alt1-win32.phpt b/ext/standard/tests/mail/mail_basic_alt1-win32.phpt index f615972a84..9f06e09854 100644 --- a/ext/standard/tests/mail/mail_basic_alt1-win32.phpt +++ b/ext/standard/tests/mail/mail_basic_alt1-win32.phpt @@ -19,7 +19,6 @@ max_execution_time = 120 * Alias to functions: */ -error_reporting(E_ALL & ~E_STRICT); ini_set("SMTP", "localhost"); ini_set("smtp_port", 25); ini_set("sendmail_from", "user@example.com"); diff --git a/ext/standard/tests/mail/mail_basic_alt2-win32.phpt b/ext/standard/tests/mail/mail_basic_alt2-win32.phpt index 5efe4504fe..498554f947 100644 --- a/ext/standard/tests/mail/mail_basic_alt2-win32.phpt +++ b/ext/standard/tests/mail/mail_basic_alt2-win32.phpt @@ -18,8 +18,6 @@ max_execution_time = 120 * Alias to functions: */ -error_reporting(E_ALL & ~E_STRICT); - echo "*** Testing mail() : basic functionality ***\n"; require_once(__DIR__.'/mail_include.inc'); $subject_prefix = "!**PHPT**!"; diff --git a/ext/standard/tests/mail/mail_basic_alt3-win32.phpt b/ext/standard/tests/mail/mail_basic_alt3-win32.phpt index 955c47451f..172474b1d0 100644 --- a/ext/standard/tests/mail/mail_basic_alt3-win32.phpt +++ b/ext/standard/tests/mail/mail_basic_alt3-win32.phpt @@ -18,8 +18,6 @@ max_execution_time = 120 * Alias to functions: */ -error_reporting(E_ALL & ~E_STRICT); - echo "*** Testing mail() : basic functionality ***\n"; require_once(__DIR__.'/mail_include.inc'); $subject_prefix = "!**PHPT**!"; diff --git a/ext/standard/tests/mail/mail_basic_alt4-win32.phpt b/ext/standard/tests/mail/mail_basic_alt4-win32.phpt index 4cf3367073..9e7cbc5802 100644 --- a/ext/standard/tests/mail/mail_basic_alt4-win32.phpt +++ b/ext/standard/tests/mail/mail_basic_alt4-win32.phpt @@ -18,8 +18,6 @@ max_execution_time = 120 * Alias to functions: */ -error_reporting(E_ALL & ~E_STRICT); - echo "*** Testing mail() : basic functionality ***\n"; require_once(__DIR__.'/mail_include.inc'); $subject_prefix = "!**PHPT**!"; diff --git a/ext/standard/tests/mail/mail_variation_alt1-win32.phpt b/ext/standard/tests/mail/mail_variation_alt1-win32.phpt index 598dea9c3b..bd259667c2 100644 --- a/ext/standard/tests/mail/mail_variation_alt1-win32.phpt +++ b/ext/standard/tests/mail/mail_variation_alt1-win32.phpt @@ -18,7 +18,6 @@ max_execution_time = 120 * Alias to functions: */ -error_reporting(E_ALL & ~E_STRICT); ini_set("SMTP", "localhost"); ini_set("smtp_port", 2525); ini_set("sendmail_from", "user@example.com"); diff --git a/ext/standard/tests/mail/mail_variation_alt2-win32.phpt b/ext/standard/tests/mail/mail_variation_alt2-win32.phpt index 78df2c7ddf..c0698076e1 100644 --- a/ext/standard/tests/mail/mail_variation_alt2-win32.phpt +++ b/ext/standard/tests/mail/mail_variation_alt2-win32.phpt @@ -18,7 +18,6 @@ max_execution_time = 120 * Alias to functions: */ -error_reporting(E_ALL & ~E_STRICT); ini_set("SMTP", "localplace"); ini_set("smtp_port", 25); ini_set("sendmail_from", "user@example.com"); diff --git a/ext/standard/tests/mail/mail_variation_alt3-win32.phpt b/ext/standard/tests/mail/mail_variation_alt3-win32.phpt index afae8e8729..fe961d3d16 100644 --- a/ext/standard/tests/mail/mail_variation_alt3-win32.phpt +++ b/ext/standard/tests/mail/mail_variation_alt3-win32.phpt @@ -18,7 +18,6 @@ max_execution_time = 120 * Alias to functions: */ -error_reporting(E_ALL & ~E_STRICT); ini_set("SMTP", "localhost"); ini_set("smtp_port", 25); diff --git a/ext/zip/examples/get_set_comments.php b/ext/zip/examples/get_set_comments.php index bec4240246..600b51138d 100644 --- a/ext/zip/examples/get_set_comments.php +++ b/ext/zip/examples/get_set_comments.php @@ -1,5 +1,4 @@ <?php -error_reporting(E_ALL|E_STRICT); copy('test_with_comment.zip', 't.zip'); $z = new ZipArchive; diff --git a/run-tests.php b/run-tests.php index 2c11961a05..7f4fce37e2 100755 --- a/run-tests.php +++ b/run-tests.php @@ -238,7 +238,7 @@ NO_PROC_OPEN_ERROR; 'open_basedir=', 'disable_functions=', 'output_buffering=Off', - 'error_reporting=' . (E_ALL | E_STRICT), + 'error_reporting=' . E_ALL, 'display_errors=1', 'display_startup_errors=1', 'log_errors=0', @@ -1624,7 +1624,7 @@ escape: 'E_USER_ERROR', 'E_USER_WARNING', 'E_USER_NOTICE', - 'E_STRICT', + 'E_STRICT', // TODO Cleanup when removed from Zend Engine. 'E_RECOVERABLE_ERROR', 'E_USER_DEPRECATED' ]; diff --git a/tests/func/011.phpt b/tests/func/011.phpt index ec93214a78..bc698c7743 100644 --- a/tests/func/011.phpt +++ b/tests/func/011.phpt @@ -1,10 +1,10 @@ --TEST-- Test bitwise AND, OR, XOR, NOT and logical NOT in INI via error_reporting --INI-- -error_reporting = E_ALL & E_NOTICE | E_STRICT ^ E_DEPRECATED & ~E_WARNING | !E_ERROR +error_reporting = E_ALL & E_NOTICE | E_PARSE ^ E_DEPRECATED & ~E_WARNING | !E_ERROR --FILE-- <?php echo ini_get('error_reporting'); ?> --EXPECT-- -10248 +8204 diff --git a/tests/func/bug64523.phpt b/tests/func/bug64523.phpt index 88adc43959..d360f097ff 100644 --- a/tests/func/bug64523.phpt +++ b/tests/func/bug64523.phpt @@ -1,10 +1,10 @@ --TEST-- Bug #64523: XOR not parsed in INI --INI-- -error_reporting = E_ALL ^ E_NOTICE ^ E_STRICT ^ E_DEPRECATED +error_reporting = E_ALL ^ E_NOTICE ^ E_WARNING ^ E_DEPRECATED --FILE-- <?php echo ini_get('error_reporting'); ?> --EXPECT-- -22519 +24565 |