Bad error line and file for invalid "-d" arguments
未关闭
还没有人认领这个 Issue。
Feature
Status: Verified
- 主要语言
- C
- 星标
- 40.4k
- 派生
- 8.2k
- 平均合并
- 2 天 13 小时
- 30 天内合并 PR
- 96
描述
Description
The following code:
php -d 'foo=bar=asd' -r "echo 'hello' . PHP_EOL;"
Resulted in this output:
PHP: syntax error, unexpected '=' in Unknown on line 6
hello
But I expected this output instead:
PHP: syntax error, unexpected '=' in -d option on line 0
hello
Not sure where it gets that line 6 from, and the "Unknown" could also be improved
PHP Version
8.5
Operating System
No response
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
使用所示的 php -d 'foo=bar=asd' -r 命令重现该问题,并检查 PHP CLI 对无效 -d 参数的处理。诊断报告 -d option 和第 0 行,同时命令仍输出 hello 时,工作即完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- c, php
- 领域
- cli
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100