Skip to content

Commit

Permalink
fix infinite loop bug in PHP 7
Browse files Browse the repository at this point in the history
  • Loading branch information
kkmuffme committed Jun 6, 2023
1 parent 9318972 commit 1f913c8
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,11 @@ public static function getFunctionReturnType(FunctionReturnTypeProviderEvent $ev
break;
}

array_pop($dummy);
// for PHP 7, since it doesn't throw above
// abort if it's empty, since we checked everything
if (array_pop($dummy) === null) {
break;
}
}

if ($event->getFunctionId() === 'printf') {
Expand Down

0 comments on commit 1f913c8

Please sign in to comment.