Skip to content

Commit

Permalink
Enforce string type for string operations
Browse files Browse the repository at this point in the history
split: b40122acb6c4acafd4e04ff3cef4f202876eb2cb
  • Loading branch information
kylekatarnls committed Nov 11, 2021
1 parent a3accd5 commit 5b16f9f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Renderer/Partial/Debug/DebuggerTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ private function getErrorMessage($error, SourceLocation $location, $data)
$contextLines = $data->options['error_context_lines'];
$code = '';
$sourceOffset = max(0, $line - 1);
$untilOffset = isset($source[$sourceOffset]) ? (mb_substr($source[$sourceOffset], 0, $offset ?: 0) ?: '') : '';
$untilOffset = isset($source[$sourceOffset]) ? mb_substr((string) $source[$sourceOffset], 0, $offset ?: 0) : '';
$htmlError = $data->options['html_error'];
$start = null;
foreach ($source as $index => $lineText) {
Expand Down

0 comments on commit 5b16f9f

Please sign in to comment.