From 414e521f1a552a6d33327f01ace27da8ae0c111d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kuba=20Wer=C5=82os?= Date: Sat, 23 Aug 2025 09:51:56 +0200 Subject: [PATCH] Remove redundant `PARSER_MODE()` call (#19559) --- Zend/zend_language_scanner.l | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Zend/zend_language_scanner.l b/Zend/zend_language_scanner.l index 2ccdc8b011689..3ecb2f8d0ee45 100644 --- a/Zend/zend_language_scanner.l +++ b/Zend/zend_language_scanner.l @@ -1641,7 +1641,7 @@ OPTIONAL_WHITESPACE_OR_COMMENTS ({WHITESPACE}|{MULTI_LINE_COMMENT}|{SINGLE_LINE_ "("{TABS_AND_SPACES}("integer"){TABS_AND_SPACES}")" { if (PARSER_MODE()) { zend_error(E_DEPRECATED, "Non-canonical cast (integer) is deprecated, use the (int) cast instead"); - if (PARSER_MODE() && EG(exception)) { + if (EG(exception)) { RETURN_TOKEN(T_ERROR); } } @@ -1655,7 +1655,7 @@ OPTIONAL_WHITESPACE_OR_COMMENTS ({WHITESPACE}|{MULTI_LINE_COMMENT}|{SINGLE_LINE_ "("{TABS_AND_SPACES}("double"){TABS_AND_SPACES}")" { if (PARSER_MODE()) { zend_error(E_DEPRECATED, "Non-canonical cast (double) is deprecated, use the (float) cast instead"); - if (PARSER_MODE() && EG(exception)) { + if (EG(exception)) { RETURN_TOKEN(T_ERROR); } } @@ -1677,7 +1677,7 @@ OPTIONAL_WHITESPACE_OR_COMMENTS ({WHITESPACE}|{MULTI_LINE_COMMENT}|{SINGLE_LINE_ "("{TABS_AND_SPACES}("binary"){TABS_AND_SPACES}")" { if (PARSER_MODE()) { zend_error(E_DEPRECATED, "Non-canonical cast (binary) is deprecated, use the (string) cast instead"); - if (PARSER_MODE() && EG(exception)) { + if (EG(exception)) { RETURN_TOKEN(T_ERROR); } } @@ -1699,7 +1699,7 @@ OPTIONAL_WHITESPACE_OR_COMMENTS ({WHITESPACE}|{MULTI_LINE_COMMENT}|{SINGLE_LINE_ "("{TABS_AND_SPACES}("boolean"){TABS_AND_SPACES}")" { if (PARSER_MODE()) { zend_error(E_DEPRECATED, "Non-canonical cast (boolean) is deprecated, use the (bool) cast instead"); - if (PARSER_MODE() && EG(exception)) { + if (EG(exception)) { RETURN_TOKEN(T_ERROR); } }