diff --git a/Renderer/Partial/Debug/DebuggerTrait.php b/Renderer/Partial/Debug/DebuggerTrait.php index 2a1c738..fe5c1ae 100644 --- a/Renderer/Partial/Debug/DebuggerTrait.php +++ b/Renderer/Partial/Debug/DebuggerTrait.php @@ -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) {