php / php/php-src

Error when killing script: Object of class UnwindExit could not be converted to string

Aperta
#11,821 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Bug Category: Engine Status: Verified
Lingua principale
C
Stelle
40.4k
Fork
8.2k
Merge medio
2g 13h
PR unite (30g)
96

Descrizione

Description

I am running PHP 8.2.8 and PHP 8.3.0 Beta 1, and at times, I get this error when killing a cli script:

Object of class UnwindExit could not be converted to string

It's been tricky to reproduce, but I can intermittently get the error by:

  1. Unzip attached code.zip.
  2. Run: php -n test.php
  3. Immediately press Ctrl-C.

If no errors appear, repeat running the script and pressing Ctrl-C.

The error I get is:

Warning: Uncaught Error: Object of class UnwindExit could not be converted to string in /tmp/test/a.php:2
Stack trace:
#0 /tmp/test/test.php(4): require()
#1 /tmp/test/test.php(14): {closure}('a')
#2 {main}
  thrown in /tmp/test/a.php on line 2

Fatal error: During class fetch: Uncaught  in /tmp/test/a.php on line 2

I believe the error comes up when the script is killed while one of the classes is being loaded.

Please let me know if I can provide more information to narrow it down.

Thanks for your help.

PHP Version

PHP 8.2.8 and PHP 8.3.0 Beta 1

Operating System

Linux

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Estrai code.zip e inizia con /tmp/test/test.php e /tmp/test/a.php; esegui php -n test.php e premi Ctrl-C mentre lo script sta caricando le classi. Traccia l’interruzione della CLI e il percorso di caricamento delle classi attorno a questa riproduzione. Il lavoro è completato quando l’errore intermittente di conversione di UnwindExit non si verifica più quando lo script viene terminato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
c, php
Ambito
backend, cli
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Tranquilla
Chiarezza
Abbastanza chiara
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.