From 894cc91a89554d78ee7384ea4d50b50215c3bd11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nico=20Hoffmann=20=20=E0=B7=B4?= Date: Sun, 18 Sep 2022 18:56:22 +0200 Subject: [PATCH] `Response::guardAgainstOutput()`: add filename and line number Co-authored-by: Lukas Bestle --- src/Http/Response.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Http/Response.php b/src/Http/Response.php index 94c6fe61dd..73219c182e 100644 --- a/src/Http/Response.php +++ b/src/Http/Response.php @@ -188,10 +188,10 @@ public static function guardAgainstOutput(Closure $callback, ...$args): mixed { $before = headers_sent(); $result = $callback($args); - $after = headers_sent(); + $after = headers_sent($file, $line); if ($before === false && $after === true) { - throw new LogicException('Disallowed output from file $file:$line, possible accidental whitespace?'); + throw new LogicException("Disallowed output from file $file:$line, possible accidental whitespace?"); } return $result;