Skip to content

Commit 915ad42

Browse files
committed
Fix condition check in InlineChecker to ensure both 'object' and 'class' are set before comparison
1 parent 8b46b8d commit 915ad42

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/Internal/Checker/InlineChecker.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ private static function trySelfOutTransition(mixed $value, object $object, strin
360360
$contract = null;
361361

362362
foreach ($trace as $frame) {
363-
if (isset($frame['object']) && $frame['object'] === $object && isset($frame['class'], $frame['function'])) {
363+
if (isset($frame['object'], $frame['class']) && $frame['object'] === $object) {
364364
if ($frame['class'] === 'TypePHP\Internal\RuntimeTypeChecker' || str_starts_with($frame['class'], 'TypePHP\\Internal\\')) {
365365
continue;
366366
}

0 commit comments

Comments
 (0)