File tree Expand file tree Collapse file tree 2 files changed +18
-5
lines changed Expand file tree Collapse file tree 2 files changed +18
-5
lines changed Original file line number Diff line number Diff line change 32
32
<license uri =" http://www.opensource.org/licenses/mit-license.php" >MIT</license >
33
33
<notes >
34
34
Bugs Fixed:
35
+ - yaml_parse_file_002.phpt: Fix expectations for PHP 8.0.0beta1 (bd808)
35
36
- Remove use of call_user_function_ex() for compat with PHP 8.0.0a2 (andypost)
36
37
- Adjust test values for compat with 32bit platforms (bd808)
37
38
- Fix memory leaks (cmb69)
Original file line number Diff line number Diff line change @@ -7,20 +7,32 @@ yaml.decode_timestamp=1
7
7
date.timezone=GMT
8
8
--FILE--
9
9
<?php
10
- yaml_parse_file (NULL );
11
- yaml_parse_file ('' );
10
+ try {
11
+ // PHP7 emits a Warning here
12
+ yaml_parse_file (NULL );
13
+ } catch (ValueError $ e ) {
14
+ // PHP8 raises this exception
15
+ echo "\nWarning: yaml_parse_file(): {$ e ->getMessage ()} in " . __FILE__ . " on line 4 \n" ;
16
+ }
17
+ try {
18
+ // PHP7 emits a Warning here
19
+ yaml_parse_file ('' );
20
+ } catch (ValueError $ e ) {
21
+ // PHP8 raises this exception
22
+ echo "\nWarning: yaml_parse_file(): {$ e ->getMessage ()} in " . __FILE__ . " on line 11 \n" ;
23
+ }
12
24
yaml_parse_file ('invalid ' );
13
25
try {
14
26
// PHP7 emits a Warning here
15
27
yaml_parse_file ();
16
28
} catch (ArgumentCountError $ e ) {
17
29
// PHP8 raises this exception
18
- echo "\nWarning: {$ e ->getMessage ()} in " . __FILE__ . " on line 7 \n" ;
30
+ echo "\nWarning: {$ e ->getMessage ()} in " . __FILE__ . " on line 19 \n" ;
19
31
}
20
32
--EXPECTF --
21
- Warning: yaml_parse_file(): Filename cannot be empty in %s on line %d
33
+ Warning: yaml_parse_file (): % r ( Filename|Path)%r cannot be empty in %s on line %d
22
34
23
- Warning: yaml_parse_file (): Filename cannot be empty in %s on line %d
35
+ Warning: yaml_parse_file (): % r ( Filename|Path)%r cannot be empty in %s on line %d
24
36
25
37
Warning: yaml_parse_file (invalid): %r[Ff]%railed to open stream: No such file or directory in %s on line %d
26
38
You can’t perform that action at this time.
0 commit comments