Skip to content

Commit df8fe9c

Browse files
committed
deal with errors being thrown on PHP 8
1 parent 5d23cbf commit df8fe9c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Caster/SplCaster.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,14 @@ public static function castFileInfo(\SplFileInfo $c, array $a, Stub $stub, $isNe
108108

109109
$a[$prefix.''] = 'The parent constructor was not called: the object is in an invalid state';
110110

111+
return $a;
112+
} catch (\Error $e) {
113+
if ('Object not initialized' !== $e->getMessage()) {
114+
throw $e;
115+
}
116+
117+
$a[$prefix.''] = 'The parent constructor was not called: the object is in an invalid state';
118+
111119
return $a;
112120
}
113121
}

0 commit comments

Comments
 (0)