summaryrefslogtreecommitdiff
path: root/sapi
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2020-12-02 10:40:57 +0100
committerNikita Popov <nikita.ppv@gmail.com>2020-12-02 11:03:58 +0100
commitfef08723c1b584f69cbd164cf6557f680f2bc158 (patch)
tree2de34a4b28a1ef00ee40c386a80521fbbd91ebb9 /sapi
parentecb1592ea6dce69f8631e1820dd54120f56611a8 (diff)
downloadphp-git-fef08723c1b584f69cbd164cf6557f680f2bc158.tar.gz
Ensure consistent error message in phpdbg parser
This would be either $end or "end of file" depending on bison version. Explicitly specify "end of command" instead, which seems more appropriate in context.
Diffstat (limited to 'sapi')
-rw-r--r--sapi/phpdbg/phpdbg_parser.y1
-rw-r--r--sapi/phpdbg/tests/bug76813.phpt6
2 files changed, 4 insertions, 3 deletions
diff --git a/sapi/phpdbg/phpdbg_parser.y b/sapi/phpdbg/phpdbg_parser.y
index cdfe92570e..2953b3bcce 100644
--- a/sapi/phpdbg/phpdbg_parser.y
+++ b/sapi/phpdbg/phpdbg_parser.y
@@ -39,6 +39,7 @@ ZEND_EXTERN_MODULE_GLOBALS(phpdbg)
%define api.value.type {phpdbg_param_t}
%define parse.error verbose
+%token END 0 "end of command"
%token T_EVAL "eval"
%token T_RUN "run"
%token T_SHELL "shell"
diff --git a/sapi/phpdbg/tests/bug76813.phpt b/sapi/phpdbg/tests/bug76813.phpt
index 61e5e3fea6..67a51d7316 100644
--- a/sapi/phpdbg/tests/bug76813.phpt
+++ b/sapi/phpdbg/tests/bug76813.phpt
@@ -4,7 +4,7 @@ Bug #76813 (Access_violation_near_NULL_on_source_operand)
"#!==)===\377\377\276\242="
#!==)===\377\377\276\242=
--EXPECT--
-prompt> [Parse Error: syntax error, unexpected input, expecting $end]
-prompt> [Parse Error: syntax error, unexpected # (pound sign), expecting $end]
-prompt> [Parse Error: syntax error, unexpected # (pound sign), expecting $end]
+prompt> [Parse Error: syntax error, unexpected input, expecting end of command]
+prompt> [Parse Error: syntax error, unexpected # (pound sign), expecting end of command]
+prompt> [Parse Error: syntax error, unexpected # (pound sign), expecting end of command]
prompt>