Skip to content

Commit 91857cc

Browse files
authored
Use an explicit failure check for zend_result functions in the scanner (#10688)
1 parent 1c62c60 commit 91857cc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Zend/zend_language_scanner.l

+2-2
Original file line numberDiff line numberDiff line change
@@ -1329,15 +1329,15 @@ static zend_result check_nesting_at_end(void)
13291329
} while (0)
13301330

13311331
#define RETURN_EXIT_NESTING_TOKEN(_token) do { \
1332-
if (exit_nesting(_token) && PARSER_MODE()) { \
1332+
if (exit_nesting(_token) != SUCCESS && PARSER_MODE()) { \
13331333
RETURN_TOKEN(T_ERROR); \
13341334
} else { \
13351335
RETURN_TOKEN(_token); \
13361336
} \
13371337
} while(0)
13381338

13391339
#define RETURN_END_TOKEN do { \
1340-
if (check_nesting_at_end() && PARSER_MODE()) { \
1340+
if (check_nesting_at_end() != SUCCESS && PARSER_MODE()) { \
13411341
RETURN_TOKEN(T_ERROR); \
13421342
} else { \
13431343
RETURN_TOKEN(END); \

0 commit comments

Comments
 (0)