Make sure you read Issues Guideline and answer these questions before submitting your issue. Thanks!
(Any non-English issues will be closed immediately.)
Please provide your PHP and Swoole version. (php -v and php --ri swoole)
PHP 7.4
Swoole 4.8.5
Please provide your Laravel/Lumen version.
Lumen 8.3.4
Which release version of this package are you using?
swooletw/laravel-swoole 2.11
What did you do? If possible, provide a recipe for reproducing the error.
我希望在执行业务逻辑之前终止输出,比如在auth JWT中间件中输出json格式的“Token does not exist”的提示。我不能使用exit,因为这是禁止的;也不想使用throw,因为它不能让我输出想要的json格式。所以我希望禁止输出而使用了ob_end_flush()。
但是原包中SwooleTW\Http\Server\Sandbox line 242 行中有一句ob_end_clean()会造成错误。
What did you expect to see?
能否将SwooleTW\Http\Server\Sandbox line 242 行中ob_end_clean()修改为:
Make sure you read Issues Guideline and answer these questions before submitting your issue. Thanks! (Any non-English issues will be closed immediately.)
Please provide your PHP and Swoole version. (
php -v
andphp --ri swoole
) PHP 7.4 Swoole 4.8.5Please provide your Laravel/Lumen version. Lumen 8.3.4
Which release version of this package are you using? swooletw/laravel-swoole 2.11
What did you do? If possible, provide a recipe for reproducing the error. 我希望在执行业务逻辑之前终止输出,比如在auth JWT中间件中输出json格式的“Token does not exist”的提示。我不能使用exit,因为这是禁止的;也不想使用throw,因为它不能让我输出想要的json格式。所以我希望禁止输出而使用了ob_end_flush()。
但是原包中SwooleTW\Http\Server\Sandbox line 242 行中有一句ob_end_clean()会造成错误。
if(ob_get_contents()) ob_end_clean();