Skip to content

Commit

Permalink
Fix parse error for error lines with "eval()'d code" in them
Browse files Browse the repository at this point in the history
Used twig in a project, when it would error out, a blank page was returned. Turns out it wasn't fully getting the path properly because it had the string "(123) eval()'d code:456" in it. Just helping to parse it better.
  • Loading branch information
n0nag0n authored and ikkez committed Apr 4, 2020
1 parent 998454f commit 419e6da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Falsum/Run.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public static function handleError(\Base $fw) {
$errors[$key]=[];
$errors[$key]['line']=str_replace(':','',$line[0][0]);
$errors[$key]['file']=
str_replace(':'.$errors[$key]['line'],'',$result);
preg_replace("/(:".$errors[$key]['line']."|\(\d+\) : eval\(\)\'d code:".$errors[$key]['line'].")/",'',$result);

$eol='';
$line=$errors[$key]['line']-1;
Expand Down

0 comments on commit 419e6da

Please sign in to comment.