`restore_xxx_handler()` does silently return even if there is no handler to restore
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
The following code:
repro: https://3v4l.org/DDulh
<?php
restore_error_handler();
restore_error_handler();
restore_error_handler();
restore_exception_handler();
restore_exception_handler();
restore_exception_handler();
Resulted in this output:
But I expected this output instead:
php warning for each restore_xxx_handler() call if there is no handler to restore
The warnings are important to be inform the developer the operation is probably not wanted (ie. handler was never added).
PHP Version
any
Operating System
any
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 individuando le implementazioni di restore_error_handler() e restore_exception_handler() nel codice sorgente di PHP, quindi esamina come vengono gestite attualmente le chiamate ripetute. Riproduci la sequenza segnalata e aggiungi la copertura per le chiamate effettuate senza un handler da ripristinare. Il lavoro è completato quando ciascuna di queste chiamate emette l'avviso PHP previsto senza interrompere il normale ripristino dell'handler.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- c, php
- Ambito
- backend
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 42/100