Skip to content

Commit 414e521

Browse files
authored
Remove redundant PARSER_MODE() call (#19559)
1 parent 94d0b41 commit 414e521

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Zend/zend_language_scanner.l

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1641,7 +1641,7 @@ OPTIONAL_WHITESPACE_OR_COMMENTS ({WHITESPACE}|{MULTI_LINE_COMMENT}|{SINGLE_LINE_
16411641
<ST_IN_SCRIPTING>"("{TABS_AND_SPACES}("integer"){TABS_AND_SPACES}")" {
16421642
if (PARSER_MODE()) {
16431643
zend_error(E_DEPRECATED, "Non-canonical cast (integer) is deprecated, use the (int) cast instead");
1644-
if (PARSER_MODE() && EG(exception)) {
1644+
if (EG(exception)) {
16451645
RETURN_TOKEN(T_ERROR);
16461646
}
16471647
}
@@ -1655,7 +1655,7 @@ OPTIONAL_WHITESPACE_OR_COMMENTS ({WHITESPACE}|{MULTI_LINE_COMMENT}|{SINGLE_LINE_
16551655
<ST_IN_SCRIPTING>"("{TABS_AND_SPACES}("double"){TABS_AND_SPACES}")" {
16561656
if (PARSER_MODE()) {
16571657
zend_error(E_DEPRECATED, "Non-canonical cast (double) is deprecated, use the (float) cast instead");
1658-
if (PARSER_MODE() && EG(exception)) {
1658+
if (EG(exception)) {
16591659
RETURN_TOKEN(T_ERROR);
16601660
}
16611661
}
@@ -1677,7 +1677,7 @@ OPTIONAL_WHITESPACE_OR_COMMENTS ({WHITESPACE}|{MULTI_LINE_COMMENT}|{SINGLE_LINE_
16771677
<ST_IN_SCRIPTING>"("{TABS_AND_SPACES}("binary"){TABS_AND_SPACES}")" {
16781678
if (PARSER_MODE()) {
16791679
zend_error(E_DEPRECATED, "Non-canonical cast (binary) is deprecated, use the (string) cast instead");
1680-
if (PARSER_MODE() && EG(exception)) {
1680+
if (EG(exception)) {
16811681
RETURN_TOKEN(T_ERROR);
16821682
}
16831683
}
@@ -1699,7 +1699,7 @@ OPTIONAL_WHITESPACE_OR_COMMENTS ({WHITESPACE}|{MULTI_LINE_COMMENT}|{SINGLE_LINE_
16991699
<ST_IN_SCRIPTING>"("{TABS_AND_SPACES}("boolean"){TABS_AND_SPACES}")" {
17001700
if (PARSER_MODE()) {
17011701
zend_error(E_DEPRECATED, "Non-canonical cast (boolean) is deprecated, use the (bool) cast instead");
1702-
if (PARSER_MODE() && EG(exception)) {
1702+
if (EG(exception)) {
17031703
RETURN_TOKEN(T_ERROR);
17041704
}
17051705
}

0 commit comments

Comments
 (0)