Merge branch 'PHP-7.4'

This commit is contained in:
Nikita Popov 2019-07-23 11:28:10 +02:00
commit d37d418927
27 changed files with 29 additions and 43 deletions

View File

@ -3,7 +3,7 @@ Bug #33771 (error_reporting falls to 0 when @ was used inside try/catch block)
--FILE-- --FILE--
<?php <?php
error_reporting(E_ALL | E_STRICT); error_reporting(E_ALL);
var_dump(error_reporting()); var_dump(error_reporting());
@ -14,7 +14,7 @@ function make_exception()
function make_exception_and_change_err_reporting() function make_exception_and_change_err_reporting()
{ {
error_reporting(E_ALL & ~E_STRICT); error_reporting(E_ALL & ~E_NOTICE);
throw new Exception(); throw new Exception();
} }
@ -36,5 +36,5 @@ echo "Done\n";
--EXPECT-- --EXPECT--
int(32767) int(32767)
int(32767) int(32767)
int(30719) int(32759)
Done Done

View File

@ -1,5 +1,5 @@
--TEST-- --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-- --FILE--
<?php <?php
class Base class Base

View File

@ -1,5 +1,5 @@
--TEST-- --TEST--
Bug #64988 (Class loading order affects E_STRICT warning) Bug #64988 (Class loading order affects E_WARNING warning)
--FILE-- --FILE--
<?php <?php
abstract class Base1 { abstract class Base1 {

View File

@ -1,5 +1,5 @@
--TEST-- --TEST--
bug67436: E_STRICT instead of custom error handler bug67436: E_WARNING instead of custom error handler
--FILE-- --FILE--
<?php <?php

View File

@ -3,13 +3,13 @@ testing @ and error_reporting - 2
--FILE-- --FILE--
<?php <?php
error_reporting(E_ALL); error_reporting(E_ALL & ~E_DEPRECATED);
function foo($arg) { function foo($arg) {
} }
function bar() { function bar() {
error_reporting(E_ALL|E_STRICT); error_reporting(E_ALL);
throw new Exception("test"); throw new Exception("test");
} }

View File

@ -3,7 +3,7 @@ testing @ and error_reporting - 3
--FILE-- --FILE--
<?php <?php
error_reporting(E_ALL); error_reporting(E_ALL & ~E_DEPRECATED);
function foo($arg) { function foo($arg) {
echo @$nonex_foo; echo @$nonex_foo;
@ -16,7 +16,7 @@ function bar() {
function foo1() { function foo1() {
echo $undef1; echo $undef1;
error_reporting(E_ALL|E_STRICT); error_reporting(E_ALL);
echo $undef2; echo $undef2;
} }

View File

@ -3,11 +3,11 @@ testing @ and error_reporting - 4
--FILE-- --FILE--
<?php <?php
error_reporting(E_ALL); error_reporting(E_ALL & ~E_DEPRECATED);
function foo() { function foo() {
echo $undef; echo $undef;
error_reporting(E_ALL|E_STRICT); error_reporting(E_ALL);
} }

View File

@ -3,7 +3,7 @@ testing @ and error_reporting - 8
--FILE-- --FILE--
<?php <?php
error_reporting(E_ALL); error_reporting(E_ALL & ~E_DEPRECATED);
function foo1($arg) { function foo1($arg) {
} }
@ -12,7 +12,7 @@ function foo2($arg) {
} }
function foo3() { function foo3() {
error_reporting(E_ALL|E_STRICT); error_reporting(E_ALL);
echo $undef3; echo $undef3;
throw new Exception("test"); throw new Exception("test");
} }

View File

@ -3,7 +3,7 @@ testing @ and error_reporting - 9
--FILE-- --FILE--
<?php <?php
error_reporting(E_ALL); error_reporting(E_ALL & ~E_DEPRECATED);
function bar() { function bar() {
echo @$blah; echo @$blah;
@ -12,7 +12,7 @@ function bar() {
function foo() { function foo() {
echo @$undef; echo @$undef;
error_reporting(E_ALL|E_STRICT); error_reporting(E_ALL);
echo $blah; echo $blah;
return bar(); return bar();
} }

View File

@ -3,8 +3,6 @@ Throwing exception using a class that isn't derived from the Exception base clas
--FILE-- --FILE--
<?php <?php
error_reporting(E_ALL|E_STRICT);
class Foo { } class Foo { }
try { try {

View File

@ -765,7 +765,7 @@ static int make_callable_ex(pdo_stmt_t *stmt, zval *callable, zend_fcall_info *
return 0; return 0;
} }
if (is_callable_error) { if (is_callable_error) {
/* Possible E_STRICT error message */ /* Possible error message */
efree(is_callable_error); efree(is_callable_error);
} }

View File

@ -19,9 +19,9 @@ MySQLPDOTest::skip();
return call_user_func_array(array($this, 'parent::__construct'), func_get_args()); return call_user_func_array(array($this, 'parent::__construct'), func_get_args());
} }
public function exec($query) { public function exec($statement) {
$this->protocol(); $this->protocol();
return call_user_func_array(array($this, 'parent::exec'), func_get_args()); return parent::exec($statement);
} }
public function query() { public function query() {

View File

@ -74,7 +74,7 @@ class PHPUnit_Framework_TestResult
$oldErrorHandler = set_error_handler( $oldErrorHandler = set_error_handler(
'handleError', 'handleError',
E_ALL | E_STRICT E_ALL
); );
try { try {

View File

@ -934,7 +934,7 @@ int phar_free_alias(phar_archive_data *phar, char *alias, size_t alias_len) /* {
return FAILURE; 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) { if (zend_hash_str_del(&(PHAR_G(phar_fname_map)), phar->fname, phar->fname_len) != SUCCESS) {
return FAILURE; return FAILURE;
} }

View File

@ -4,7 +4,6 @@ Bug #46427 (SoapClient() stumbles over its "stream_context" parameter)
<?php require_once('skipif.inc'); ?> <?php require_once('skipif.inc'); ?>
--FILE-- --FILE--
<?php <?php
error_reporting(E_ALL|E_STRICT);
function getSoapClient_1() { function getSoapClient_1() {
$ctx = stream_context_create(); $ctx = stream_context_create();

View File

@ -3,8 +3,8 @@ foo = E_ALL E_NOTICE
error_reporting = E_ALL error_reporting = E_ALL
error_reporting1 = E_COMPILE_ERROR|E_RECOVERABLE_ERROR |E_ERROR|E_CORE_ERROR error_reporting1 = E_COMPILE_ERROR|E_RECOVERABLE_ERROR |E_ERROR|E_CORE_ERROR
error_reporting2 = E_ALL&~E_NOTICE error_reporting2 = E_ALL&~E_NOTICE
error_reporting3 = E_ALL & ~E_NOTICE error_reporting3 = E_ALL & ~E_NOTICE
error_reporting4 = E_ALL & ~E_NOTICE | E_STRICT error_reporting4 = E_ALL & ~E_NOTICE | E_PARSE
['true or false'] ['true or false']
bool_true = true bool_true = true

View File

@ -19,7 +19,6 @@ max_execution_time = 120
* Alias to functions: * Alias to functions:
*/ */
error_reporting(E_ALL & ~E_STRICT);
ini_set("SMTP", "localhost"); ini_set("SMTP", "localhost");
ini_set("smtp_port", 25); ini_set("smtp_port", 25);
ini_set("sendmail_from", "user@example.com"); ini_set("sendmail_from", "user@example.com");

View File

@ -18,8 +18,6 @@ max_execution_time = 120
* Alias to functions: * Alias to functions:
*/ */
error_reporting(E_ALL & ~E_STRICT);
echo "*** Testing mail() : basic functionality ***\n"; echo "*** Testing mail() : basic functionality ***\n";
require_once(__DIR__.'/mail_include.inc'); require_once(__DIR__.'/mail_include.inc');
$subject_prefix = "!**PHPT**!"; $subject_prefix = "!**PHPT**!";

View File

@ -18,8 +18,6 @@ max_execution_time = 120
* Alias to functions: * Alias to functions:
*/ */
error_reporting(E_ALL & ~E_STRICT);
echo "*** Testing mail() : basic functionality ***\n"; echo "*** Testing mail() : basic functionality ***\n";
require_once(__DIR__.'/mail_include.inc'); require_once(__DIR__.'/mail_include.inc');
$subject_prefix = "!**PHPT**!"; $subject_prefix = "!**PHPT**!";

View File

@ -18,8 +18,6 @@ max_execution_time = 120
* Alias to functions: * Alias to functions:
*/ */
error_reporting(E_ALL & ~E_STRICT);
echo "*** Testing mail() : basic functionality ***\n"; echo "*** Testing mail() : basic functionality ***\n";
require_once(__DIR__.'/mail_include.inc'); require_once(__DIR__.'/mail_include.inc');
$subject_prefix = "!**PHPT**!"; $subject_prefix = "!**PHPT**!";

View File

@ -18,7 +18,6 @@ max_execution_time = 120
* Alias to functions: * Alias to functions:
*/ */
error_reporting(E_ALL & ~E_STRICT);
ini_set("SMTP", "localhost"); ini_set("SMTP", "localhost");
ini_set("smtp_port", 2525); ini_set("smtp_port", 2525);
ini_set("sendmail_from", "user@example.com"); ini_set("sendmail_from", "user@example.com");

View File

@ -18,7 +18,6 @@ max_execution_time = 120
* Alias to functions: * Alias to functions:
*/ */
error_reporting(E_ALL & ~E_STRICT);
ini_set("SMTP", "localplace"); ini_set("SMTP", "localplace");
ini_set("smtp_port", 25); ini_set("smtp_port", 25);
ini_set("sendmail_from", "user@example.com"); ini_set("sendmail_from", "user@example.com");

View File

@ -18,7 +18,6 @@ max_execution_time = 120
* Alias to functions: * Alias to functions:
*/ */
error_reporting(E_ALL & ~E_STRICT);
ini_set("SMTP", "localhost"); ini_set("SMTP", "localhost");
ini_set("smtp_port", 25); ini_set("smtp_port", 25);

View File

@ -1,5 +1,4 @@
<?php <?php
error_reporting(E_ALL|E_STRICT);
copy('test_with_comment.zip', 't.zip'); copy('test_with_comment.zip', 't.zip');
$z = new ZipArchive; $z = new ZipArchive;

View File

@ -238,7 +238,7 @@ NO_PROC_OPEN_ERROR;
'open_basedir=', 'open_basedir=',
'disable_functions=', 'disable_functions=',
'output_buffering=Off', 'output_buffering=Off',
'error_reporting=' . (E_ALL | E_STRICT), 'error_reporting=' . E_ALL,
'display_errors=1', 'display_errors=1',
'display_startup_errors=1', 'display_startup_errors=1',
'log_errors=0', 'log_errors=0',
@ -1624,7 +1624,7 @@ escape:
'E_USER_ERROR', 'E_USER_ERROR',
'E_USER_WARNING', 'E_USER_WARNING',
'E_USER_NOTICE', 'E_USER_NOTICE',
'E_STRICT', 'E_STRICT', // TODO Cleanup when removed from Zend Engine.
'E_RECOVERABLE_ERROR', 'E_RECOVERABLE_ERROR',
'E_USER_DEPRECATED' 'E_USER_DEPRECATED'
]; ];

View File

@ -1,10 +1,10 @@
--TEST-- --TEST--
Test bitwise AND, OR, XOR, NOT and logical NOT in INI via error_reporting Test bitwise AND, OR, XOR, NOT and logical NOT in INI via error_reporting
--INI-- --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-- --FILE--
<?php <?php
echo ini_get('error_reporting'); echo ini_get('error_reporting');
?> ?>
--EXPECT-- --EXPECT--
10248 8204

View File

@ -1,10 +1,10 @@
--TEST-- --TEST--
Bug #64523: XOR not parsed in INI Bug #64523: XOR not parsed in INI
--INI-- --INI--
error_reporting = E_ALL ^ E_NOTICE ^ E_STRICT ^ E_DEPRECATED error_reporting = E_ALL ^ E_NOTICE ^ E_WARNING ^ E_DEPRECATED
--FILE-- --FILE--
<?php <?php
echo ini_get('error_reporting'); echo ini_get('error_reporting');
?> ?>
--EXPECT-- --EXPECT--
22519 24565