Generate Notice when error_reporting mode is completely disabled
Nessuno ha ancora preso questa issue.
- Lingua principale
- C
- Stelle
- 40.4k
- Fork
- 8.1k
- Merge medio
- 2g 13h
- PR unite (30g)
- 96
Descrizione
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.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia tracciando la gestione di error_reporting(0) e il percorso di avvio di PHP che legge l'impostazione INI error_reporting. Determina come verrebbe generato un Notice in ciascun caso e quale comportamento esistente o quali test coprono questi punti di ingresso. È completato quando sia le chiamate esplicite a error_reporting(0) sia l'avvio con error_reporting=0 producono il Notice previsto.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- c, php
- Ambito
- backend
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100