diff --git a/Concerns/DisableBuffering.php b/Concerns/DisableBuffering.php index 9f778e6..7f4ddb2 100644 --- a/Concerns/DisableBuffering.php +++ b/Concerns/DisableBuffering.php @@ -2,8 +2,6 @@ namespace Orchestra\Http\Concerns; -use Throwable; - trait DisableBuffering { /** @@ -22,11 +20,9 @@ protected function disableOutputBuffering(): void } // Turn off PHP output compression - try { + \rescue(static function () { \ini_set('zlib.output_compression', false); - } catch (Throwable $e) { - // - } + }, null, false); // Implicitly flush the buffer(s) \ini_set('implicit_flush', true);