php / php/php-src

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

Offen
#11,821 3 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bug Category: Engine Status: Verified
Vorherrschende Sprache
C
Sterne
40.4k
Forks
8.2k
Ø Merge
2 T. 13 Std.
Gemergte PRs (30 T.)
96

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Entpacke code.zip und beginne mit /tmp/test/test.php und /tmp/test/a.php; führe php -n test.php aus und drücke Ctrl-C, während das Skript Klassen lädt. Verfolge die CLI-Unterbrechung und den Pfad zum Laden der Klassen rund um diese Reproduktion. Die Arbeit ist abgeschlossen, wenn der intermittierende UnwindExit-Konvertierungsfehler nicht mehr auftritt, wenn das Skript beendet wird.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
c, php
Bereich
backend, cli
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.