File tree Expand file tree Collapse file tree 2 files changed +11
-6
lines changed
Zend/tests/request_parse_body Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -4,13 +4,18 @@ request_parse_body() invalid key
4
4
<?php
5
5
6
6
try {
7
- request_parse_body (options: [
8
- 'foo ' => 1 ,
9
- ]);
7
+ request_parse_body (options: ['foo ' => 1 ]);
8
+ } catch (Error $ e ) {
9
+ echo $ e ->getMessage (), "\n" ;
10
+ }
11
+
12
+ try {
13
+ request_parse_body (options: ['moo ' => 1 ]);
10
14
} catch (Error $ e ) {
11
15
echo $ e ->getMessage (), "\n" ;
12
16
}
13
17
14
18
?>
15
19
--EXPECT--
16
20
Invalid key "foo" in $options argument
21
+ Invalid key "moo" in $options argument
Original file line number Diff line number Diff line change @@ -1624,10 +1624,10 @@ static zend_result cache_request_parse_body_options(HashTable *options)
1624
1624
case 'U' :
1625
1625
CHECK_OPTION (upload_max_filesize );
1626
1626
break ;
1627
- default :
1628
- zend_value_error ("Invalid key \"%s\" in $options argument" , ZSTR_VAL (key ));
1629
- return FAILURE ;
1630
1627
}
1628
+
1629
+ zend_value_error ("Invalid key \"%s\" in $options argument" , ZSTR_VAL (key ));
1630
+ return FAILURE ;
1631
1631
} ZEND_HASH_FOREACH_END ();
1632
1632
1633
1633
#undef CACHE_OPTION
You can’t perform that action at this time.
0 commit comments