Skip to content

Commit

Permalink
Prevent segmentation fault in Reflection->getParameters() when an nat…
Browse files Browse the repository at this point in the history
…ive php function has been disabled via disabled_functions. (#523)

Rebased version of #505, which is te porting of #504 to the 2.0 branch
  • Loading branch information
Jean85 authored Jan 2, 2018
1 parent 873ab3c commit 5da84aa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/Raven/Stacktrace.php
Original file line number Diff line number Diff line change
Expand Up @@ -364,8 +364,10 @@ public static function getFrameArguments($frame, $maxValueLength = Client::MESSA
} else {
$reflection = new \ReflectionMethod($frame['class'], '__call');
}
} else {
} elseif (function_exists($frame['function'])) {
$reflection = new \ReflectionFunction($frame['function']);
} else {
return self::getFrameArgumentsValues($frame, $maxValueLength);
}
} catch (\ReflectionException $ex) {
return self::getFrameArgumentsValues($frame, $maxValueLength);
Expand Down

0 comments on commit 5da84aa

Please sign in to comment.