mirror of
https://github.com/php/php-src.git
synced 2024-11-24 02:15:04 +08:00
Fix deprecated warning in new gh8289.phpt test
This commit is contained in:
parent
16dcededa8
commit
e4c7ffc152
@ -6,7 +6,7 @@ GH-8289 (Exceptions thrown within a yielded from iterator are not rethrown into
|
||||
function yieldFromIteratorGeneratorThrows() {
|
||||
try {
|
||||
yield from new class(new ArrayIterator([1, -2])) extends IteratorIterator {
|
||||
public function key() {
|
||||
public function key(): mixed {
|
||||
if ($k = parent::key()) {
|
||||
throw new Exception;
|
||||
}
|
||||
@ -31,4 +31,4 @@ Stack trace:
|
||||
#0 %s(%d): IteratorIterator@anonymous->key()
|
||||
#1 %s(%d): yieldFromIteratorGeneratorThrows()
|
||||
#2 {main}
|
||||
int(2)
|
||||
int(2)
|
||||
|
Loading…
Reference in New Issue
Block a user