File tree Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 66 . Fixed bug GH-20113 (Missing new Foo(...) error in constant expressions).
77 (ilutov)
88 . Fixed bug GH-19844 (Don't bail when closing resources on shutdown). (ilutov)
9+ . Fixed deprecation for default case statement followed by semicolon not
10+ being emitted. (theodorejb)
911
1012- DOM:
1113 . Fix getNamedItemNS() incorrect namespace check. (nielsdos)
Original file line number Diff line number Diff line change @@ -6333,6 +6333,11 @@ static void zend_compile_switch(zend_ast *ast) /* {{{ */
63336333 zend_ast * cond_ast = case_ast -> child [0 ];
63346334 znode cond_node ;
63356335
6336+ if (case_ast -> attr == ZEND_ALT_CASE_SYNTAX ) {
6337+ CG (zend_lineno ) = case_ast -> lineno ;
6338+ zend_error (E_DEPRECATED , "Case statements followed by a semicolon (;) are deprecated, use a colon (:) instead" );
6339+ }
6340+
63366341 if (!cond_ast ) {
63376342 if (has_default_case ) {
63386343 CG (zend_lineno ) = case_ast -> lineno ;
@@ -6343,11 +6348,6 @@ static void zend_compile_switch(zend_ast *ast) /* {{{ */
63436348 continue ;
63446349 }
63456350
6346- if (case_ast -> attr == ZEND_ALT_CASE_SYNTAX ) {
6347- CG (zend_lineno ) = case_ast -> lineno ;
6348- zend_error (E_DEPRECATED , "Case statements followed by a semicolon (;) are deprecated, use a colon (:) instead" );
6349- }
6350-
63516351 zend_compile_expr (& cond_node , cond_ast );
63526352
63536353 if (expr_node .op_type == IS_CONST
Original file line number Diff line number Diff line change @@ -38,6 +38,8 @@ switch ($a):
3838endswitch ;
3939?>
4040--EXPECTF--
41+ Deprecated: Case statements followed by a semicolon (;) are deprecated, use a colon (:) instead in %s
42+
4143Deprecated: Case statements followed by a semicolon (;) are deprecated, use a colon (:) instead in %s
4244If: 11
4345While: 12346789
You can’t perform that action at this time.
0 commit comments