Skip to content

Commit

Permalink
strict fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Jan 14, 2020
1 parent f7ee5c2 commit d21d60c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Bridges/Nette/Bridge.php
Expand Up @@ -52,7 +52,7 @@ public static function renderLatteError(?\Throwable $e): ?array
$lines = file($file);
if (preg_match('#// source: (\S+\.latte)#', $lines[1], $m) && @is_file($m[1])) { // @ - may trigger error
$templateFile = $m[1];
$templateLine = $e->getLine() && preg_match('#/\* line (\d+) \*/#', $lines[$e->getLine() - 1], $m) ? (int) $m[1] : null;
$templateLine = $e->getLine() && preg_match('#/\* line (\d+) \*/#', $lines[$e->getLine() - 1], $m) ? (int) $m[1] : 0;
return [
'tab' => 'Template',
'panel' => '<p><b>File:</b> ' . Helpers::editorLink($templateFile, $templateLine) . '</p>'
Expand Down

0 comments on commit d21d60c

Please sign in to comment.