Generate Notice when error_reporting mode is completely disabled
还没有人认领这个 Issue。
- 主要语言
- C
- 星标
- 40.4k
- 派生
- 8.1k
- 平均合并
- 2 天 13 小时
- 30 天内合并 PR
- 96
描述
Description
It's quite common, especially among beginners, to be confused about seemingly ok code not performing anything at all while also not generating any error. The issue may be that either the configuration has set error_reporting to 0 or that their own code contains error_reporting(0). While some might say that there could be valid use cases to have this in a production code, I'd prefer that the language didn't encourage this. For this reason, I think it would be a good idea to generate a Notice whenever error_reporting(0) is used or during PHP startup if INI config contains error_reporting=0. A Notice is generally not considered an error, but rather an informational message. It could reduce some confusion among beginner PHP programmers.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先跟踪 error_reporting(0) 的处理方式,以及读取 error_reporting INI 设置的 PHP 启动路径。确定在每种情况下如何生成 Notice,以及现有的哪些行为或测试覆盖了这些入口点。当显式调用 error_reporting(0) 和使用 error_reporting=0 启动时都产生预期的 Notice,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- c, php
- 领域
- backend
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100