Skip to content

Commit 5b16f9f

Browse files
committed
Enforce string type for string operations
split: b40122acb6c4acafd4e04ff3cef4f202876eb2cb
1 parent a3accd5 commit 5b16f9f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Renderer/Partial/Debug/DebuggerTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ private function getErrorMessage($error, SourceLocation $location, $data)
105105
$contextLines = $data->options['error_context_lines'];
106106
$code = '';
107107
$sourceOffset = max(0, $line - 1);
108-
$untilOffset = isset($source[$sourceOffset]) ? (mb_substr($source[$sourceOffset], 0, $offset ?: 0) ?: '') : '';
108+
$untilOffset = isset($source[$sourceOffset]) ? mb_substr((string) $source[$sourceOffset], 0, $offset ?: 0) : '';
109109
$htmlError = $data->options['html_error'];
110110
$start = null;
111111
foreach ($source as $index => $lineText) {

0 commit comments

Comments
 (0)