limit stack track rows… 50+ is nuts!

This commit is contained in:
Andy Miller
2019-02-05 14:18:48 -07:00
parent 34bf8fb5bb
commit 4cf4c09339

View File

@@ -137,11 +137,13 @@ class LogViewer
* Parse text of trace into an array of lines
*
* @param $trace
* @param $rows
* @return array
*/
public static function parseTrace($trace)
public static function parseTrace($trace, $rows = 10)
{
return array_filter(preg_split('/#\d*/m', $trace));
$lines = array_filter(preg_split('/#\d*/m', $trace));
return array_slice($lines, 0, $rows);
}
}