Skip to content

Commit 68d3501

Browse files
committed
Merge branch 'pull-request/2115' into PHP-7.1
2 parents 09f7bb2 + 727b422 commit 68d3501

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+39
-37
lines changed

UPGRADING

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ PHP 7.1 UPGRADE NOTES
7676
. Calling a function with less arguments than mandatory declared ones in
7777
signature now issues a Fatal Error (Error Exception) instead of a Warning.
7878
(RFC https://wiki.php.net/rfc/too_few_args).
79+
. The error message for E_RECOVERABLE errors has been changed from "Catchable
80+
fatal error" to "Recoverable fatal error".
7981

8082
- JSON:
8183
. The serialize_precision is used instead of precision when encoding double

Zend/tests/bug72162.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ $var11 = new StdClass();
77
$var16 = error_reporting($var11);
88
?>
99
--EXPECTF--
10-
Catchable fatal error: Object of class stdClass could not be converted to string in %sbug72162.php on line %d
10+
Recoverable fatal error: Object of class stdClass could not be converted to string in %sbug72162.php on line %d

Zend/tests/class_properties_const.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ NULL
2222
Notice: Undefined property: A::$1 in %sclass_properties_const.php on line %d
2323
NULL
2424

25-
Catchable fatal error: Object of class Closure could not be converted to string in %sclass_properties_const.php on line %d
25+
Recoverable fatal error: Object of class Closure could not be converted to string in %sclass_properties_const.php on line %d

Zend/tests/exception_009.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ throw new my_exception;
2525

2626
?>
2727
--EXPECT--
28-
Catchable fatal error: Object of class stdClass could not be converted to string in Unknown on line 0
28+
Recoverable fatal error: Object of class stdClass could not be converted to string in Unknown on line 0

Zend/tests/instanceof_001.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ bool(true)
2626
bool(true)
2727
bool(false)
2828

29-
Catchable fatal error: Object of class stdClass could not be converted to string in %s on line %d
29+
Recoverable fatal error: Object of class stdClass could not be converted to string in %s on line %d

Zend/tests/objects_022.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ $foo = new foo;
2525
$foo->testFoo(new foo);
2626
$foo->testBar(new bar);
2727
$foo->testBaz(new baz);
28-
$foo->testFoo(new stdClass); // Catchable fatal error
28+
$foo->testFoo(new stdClass); // Recoverable fatal error
2929

3030
?>
3131
--EXPECTF--

ext/gmp/tests/cast.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ string(2) "42"
1919
int(42)
2020
float(42)
2121

22-
Catchable fatal error: Object of class GMP could not be converted to boolean in %s on line %d
22+
Recoverable fatal error: Object of class GMP could not be converted to boolean in %s on line %d

ext/mbstring/tests/common.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
2020
512 => "User Warning", // E_USER_WARMING
2121
1024=> "User Notice", // E_USER_NOTICE
2222
2048=> "Strict Notice", // E_STRICT
23-
4096=> "Catchable fatal error", // E_RECOVERABLE_ERROR
23+
4096=> "Recoverable fatal error", // E_RECOVERABLE_ERROR
2424
);
2525

2626
if (!empty($debug)) {

ext/openssl/tests/bug38261.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ Warning: openssl_x509_parse() expects at least 1 parameter, 0 given in %sbug3826
3131
NULL
3232
bool(false)
3333

34-
Catchable fatal error: Object of class stdClass could not be converted to string in %sbug38261.php on line %d
34+
Recoverable fatal error: Object of class stdClass could not be converted to string in %sbug38261.php on line %d

ext/pcre/tests/preg_replace_error1.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,5 @@ string(1) "a"
5555
Arg value is /[a-zA-Z]/
5656
string(1) "1"
5757

58-
Catchable fatal error: Object of class stdClass could not be converted to string in %spreg_replace_error1.php on line %d
58+
Recoverable fatal error: Object of class stdClass could not be converted to string in %spreg_replace_error1.php on line %d
5959

ext/pcre/tests/preg_replace_error2.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,5 @@ Arg value is: Array
3333
Warning: preg_replace(): Parameter mismatch, pattern is a string while replacement is an array in %spreg_replace_error2.php on line %d
3434
bool(false)
3535

36-
Catchable fatal error: Object of class stdClass could not be converted to string in %spreg_replace_error2.php on line %d
36+
Recoverable fatal error: Object of class stdClass could not be converted to string in %spreg_replace_error2.php on line %d
3737

ext/phar/tests/open_for_write_existing_b.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ $files['b/c.php'] = '<?php echo "This is b/c\n"; ?>';
2121
include 'files/phar_test.inc';
2222

2323
function err_handler($errno, $errstr, $errfile, $errline) {
24-
echo "Catchable fatal error: $errstr in $errfile on line $errline\n";
24+
echo "Recoverable fatal error: $errstr in $errfile on line $errline\n";
2525
}
2626

2727
set_error_handler("err_handler", E_RECOVERABLE_ERROR);

ext/phar/tests/open_for_write_existing_b_5_2.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ $files['b/c.php'] = '<?php echo "This is b/c\n"; ?>';
1919
include 'files/phar_test.inc';
2020

2121
function err_handler($errno, $errstr, $errfile, $errline) {
22-
echo "Catchable fatal error: $errstr in $errfile on line $errline\n";
22+
echo "Recoverable fatal error: $errstr in $errfile on line $errline\n";
2323
}
2424

2525
set_error_handler("err_handler", E_RECOVERABLE_ERROR);

ext/phar/tests/open_for_write_newfile_b.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ $files['b/c.php'] = '<?php echo "This is b/c\n"; ?>';
2121
include 'files/phar_test.inc';
2222

2323
function err_handler($errno, $errstr, $errfile, $errline) {
24-
echo "Catchable fatal error: $errstr in $errfile on line $errline\n";
24+
echo "Recoverable fatal error: $errstr in $errfile on line $errline\n";
2525
}
2626

2727
set_error_handler("err_handler", E_RECOVERABLE_ERROR);

ext/phar/tests/open_for_write_newfile_b_5_2.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ $files['b/c.php'] = '<?php echo "This is b/c\n"; ?>';
1919
include 'files/phar_test.inc';
2020

2121
function err_handler($errno, $errstr, $errfile, $errline) {
22-
echo "Catchable fatal error: $errstr in $errfile on line $errline\n";
22+
echo "Recoverable fatal error: $errstr in $errfile on line $errline\n";
2323
}
2424

2525
set_error_handler("err_handler", E_RECOVERABLE_ERROR);

ext/phar/tests/tar/open_for_write_existing_b.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ $phar->stopBuffering();
3131
ini_set('phar.readonly', 1);
3232

3333
function err_handler($errno, $errstr, $errfile, $errline) {
34-
echo "Catchable fatal error: $errstr in $errfile on line $errline\n";
34+
echo "Recoverable fatal error: $errstr in $errfile on line $errline\n";
3535
}
3636

3737
set_error_handler("err_handler", E_RECOVERABLE_ERROR);

ext/phar/tests/tar/open_for_write_existing_b_5_2.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ $phar->stopBuffering();
2929
ini_set('phar.readonly', 1);
3030

3131
function err_handler($errno, $errstr, $errfile, $errline) {
32-
echo "Catchable fatal error: $errstr in $errfile on line $errline\n";
32+
echo "Recoverable fatal error: $errstr in $errfile on line $errline\n";
3333
}
3434

3535
set_error_handler("err_handler", E_RECOVERABLE_ERROR);

ext/phar/tests/tar/open_for_write_newfile_b.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ $phar->stopBuffering();
3131
ini_set('phar.readonly', 1);
3232

3333
function err_handler($errno, $errstr, $errfile, $errline) {
34-
echo "Catchable fatal error: $errstr in $errfile on line $errline\n";
34+
echo "Recoverable fatal error: $errstr in $errfile on line $errline\n";
3535
}
3636

3737
set_error_handler("err_handler", E_RECOVERABLE_ERROR);

ext/phar/tests/tar/open_for_write_newfile_b_5_2.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ $phar->stopBuffering();
2929
ini_set('phar.readonly', 1);
3030

3131
function err_handler($errno, $errstr, $errfile, $errline) {
32-
echo "Catchable fatal error: $errstr in $errfile on line $errline\n";
32+
echo "Recoverable fatal error: $errstr in $errfile on line $errline\n";
3333
}
3434

3535
set_error_handler("err_handler", E_RECOVERABLE_ERROR);

ext/phar/tests/zip/open_for_write_existing_b.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ $phar->stopBuffering();
3131
ini_set('phar.readonly', 1);
3232

3333
function err_handler($errno, $errstr, $errfile, $errline) {
34-
echo "Catchable fatal error: $errstr in $errfile on line $errline\n";
34+
echo "Recoverable fatal error: $errstr in $errfile on line $errline\n";
3535
}
3636

3737
set_error_handler("err_handler", E_RECOVERABLE_ERROR);

ext/phar/tests/zip/open_for_write_existing_b_5_2.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ $phar->stopBuffering();
2929
ini_set('phar.readonly', 1);
3030

3131
function err_handler($errno, $errstr, $errfile, $errline) {
32-
echo "Catchable fatal error: $errstr in $errfile on line $errline\n";
32+
echo "Recoverable fatal error: $errstr in $errfile on line $errline\n";
3333
}
3434

3535
set_error_handler("err_handler", E_RECOVERABLE_ERROR);

ext/phar/tests/zip/open_for_write_newfile_b.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ $phar->stopBuffering();
3131
ini_set('phar.readonly', 1);
3232

3333
function err_handler($errno, $errstr, $errfile, $errline) {
34-
echo "Catchable fatal error: $errstr in $errfile on line $errline\n";
34+
echo "Recoverable fatal error: $errstr in $errfile on line $errline\n";
3535
}
3636

3737
set_error_handler("err_handler", E_RECOVERABLE_ERROR);

ext/phar/tests/zip/open_for_write_newfile_b_5_2.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ $phar->stopBuffering();
2929
ini_set('phar.readonly', 1);
3030

3131
function err_handler($errno, $errstr, $errfile, $errline) {
32-
echo "Catchable fatal error: $errstr in $errfile on line $errline\n";
32+
echo "Recoverable fatal error: $errstr in $errfile on line $errline\n";
3333
}
3434

3535
set_error_handler("err_handler", E_RECOVERABLE_ERROR);

ext/posix/tests/posix_getgrgid_variation.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,4 +185,4 @@ valid output
185185
Arg value
186186
valid output
187187

188-
Catchable fatal error: Object of class stdClass could not be converted to string in %s on line %d
188+
Recoverable fatal error: Object of class stdClass could not be converted to string in %s on line %d

ext/posix/tests/posix_getpgid_variation.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,4 +185,4 @@ valid output
185185
Arg value
186186
valid output
187187

188-
Catchable fatal error: Object of class stdClass could not be converted to string in %s on line %d
188+
Recoverable fatal error: Object of class stdClass could not be converted to string in %s on line %d

ext/posix/tests/posix_getpwuid_variation.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,4 +185,4 @@ valid output
185185
Arg value
186186
valid output
187187

188-
Catchable fatal error: Object of class stdClass could not be converted to string in %s on line %d
188+
Recoverable fatal error: Object of class stdClass could not be converted to string in %s on line %d

ext/posix/tests/posix_kill_variation1.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,4 +179,4 @@ bool(false)
179179
Arg value
180180
bool(false)
181181

182-
Catchable fatal error: Object of class stdClass could not be converted to string in %s on line %d
182+
Recoverable fatal error: Object of class stdClass could not be converted to string in %s on line %d

ext/posix/tests/posix_kill_variation2.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,4 +179,4 @@ bool(false)
179179
Arg value
180180
bool(false)
181181

182-
Catchable fatal error: Object of class stdClass could not be converted to string in %s on line %d
182+
Recoverable fatal error: Object of class stdClass could not be converted to string in %s on line %d

ext/posix/tests/posix_strerror_variation1.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,4 +178,4 @@ string
178178
Arg value
179179
string
180180

181-
Catchable fatal error: Object of class stdClass could not be converted to string in %s on line %d
181+
Recoverable fatal error: Object of class stdClass could not be converted to string in %s on line %d

ext/standard/tests/math/base_convert_error.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@ Warning: base_convert(): Invalid `from base' (1) in %s on line %d
4040
Warning: base_convert(): Invalid `to base' (37) in %s on line %s
4141
Incorrect input
4242

43-
Catchable fatal error: Object of class classA could not be converted to string in %s on line %d
43+
Recoverable fatal error: Object of class classA could not be converted to string in %s on line %d

ext/standard/tests/math/bindec_error.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ Warning: bindec() expects exactly 1 parameter, 0 given in %s on line %d
3434
Warning: bindec() expects exactly 1 parameter, 2 given in %s on line %d
3535
Incorrect input
3636

37-
Catchable fatal error: Object of class classA could not be converted to string in %s on line %d
37+
Recoverable fatal error: Object of class classA could not be converted to string in %s on line %d

ext/standard/tests/math/hexdec_error.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ Warning: hexdec() expects exactly 1 parameter, 2 given in %s on line %d
3333

3434
-- Incorrect input --
3535

36-
Catchable fatal error: Object of class classA could not be converted to string in %s on line %d
36+
Recoverable fatal error: Object of class classA could not be converted to string in %s on line %d

ext/standard/tests/math/octdec_error.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ Warning: octdec() expects exactly 1 parameter, 2 given in %s on line %d
3434

3535
-- Incorrect input --
3636

37-
Catchable fatal error: Object of class classA could not be converted to string in %s on line %d
37+
Recoverable fatal error: Object of class classA could not be converted to string in %s on line %d

ext/standard/tests/streams/bug61115.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ stream_context_set_params($resourceFileTemp, array());
1010
preg_replace('', function() {}, $resourceFileTemp);
1111
?>
1212
--EXPECTF--
13-
Catchable fatal error: Object of class Closure could not be converted to string in %s on line %d
13+
Recoverable fatal error: Object of class Closure could not be converted to string in %s on line %d
2 Bytes
Binary file not shown.

ext/standard/tests/strings/str_replace.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ var_dump($count);
118118

119119

120120
echo "\n-- Testing objects --\n";
121-
/* we get "Catchable fatal error: saying Object of class could not be converted
121+
/* we get "Recoverable fatal error: saying Object of class could not be converted
122122
to string" by default, when an object is passed instead of string:
123123
The error can be avoided by choosing the __toString magix method as follows: */
124124

ext/standard/tests/strings/str_replace_variation3.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ var_dump($count);
3131

3232

3333
echo "\n-- Testing objects --\n";
34-
/* we get "Catchable fatal error: saying Object of class could not be converted
34+
/* we get "Recoverable fatal error: saying Object of class could not be converted
3535
to string" by default, when an object is passed instead of string:
3636
The error can be avoided by choosing the __toString magix method as follows: */
3737

2 Bytes
Binary file not shown.
2 Bytes
Binary file not shown.
2 Bytes
Binary file not shown.
2 Bytes
Binary file not shown.
2 Bytes
Binary file not shown.

ext/standard/tests/strings/strval_error.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,4 @@ NULL
4848

4949
-- Testing strval() function with object which has not toString() method --
5050

51-
Catchable fatal error: Object of class MyClass could not be converted to string in %s on line %d
51+
Recoverable fatal error: Object of class MyClass could not be converted to string in %s on line %d
2 Bytes
Binary file not shown.

main/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1094,7 +1094,7 @@ static ZEND_COLD void php_error_cb(int type, const char *error_filename, const u
10941094
syslog_type_int = LOG_ERR;
10951095
break;
10961096
case E_RECOVERABLE_ERROR:
1097-
error_type_str = "Catchable fatal error";
1097+
error_type_str = "Recoverable fatal error";
10981098
syslog_type_int = LOG_ERR;
10991099
break;
11001100
case E_WARNING:

0 commit comments

Comments
 (0)