提问前请务必仔细阅读 如何排查故障 和 常见问题。
问题描述:
使用PHP8.1、flarum1.3无法使用首页通知中心
报错内容:
糟糕,出错啦!请刷新页面重试。
调试模式报错内容:
`GET https://bbs.createchstudio.com/api/notifications
<br />
<b>Deprecated</b>: json_decode(): Passing null to parameter #1 ($json) of type string is deprecated in <b>/www/wwwroot/bbs.createchstudio.com/vendor/flarum/core/src/Notification/Notification.php</b> on line <b>84</b><br />
<br />
<b>Deprecated</b>: json_decode(): Passing null to parameter #1 ($json) of type string is deprecated in <b>/www/wwwroot/bbs.createchstudio.com/vendor/flarum/core/src/Notification/Notification.php</b> on line <b>84</b><br />
<br />
<b>Fatal error</b>: Uncaught Laminas\HttpHandlerRunner\Exception\EmitterException: Output has been emitted previously; cannot emit response in /www/wwwroot/bbs.createchstudio.com/vendor/laminas/laminas-httphandlerrunner/src/Exception/EmitterException.php:24
Stack trace:
#0 /www/wwwroot/bbs.createchstudio.com/vendor/laminas/laminas-httphandlerrunner/src/Emitter/SapiEmitterTrait.php(40): Laminas\HttpHandlerRunner\Exception\EmitterException::forOutputSent()
#1 /www/wwwroot/bbs.createchstudio.com/vendor/laminas/laminas-httphandlerrunner/src/Emitter/SapiEmitter.php(27): Laminas\HttpHandlerRunner\Emitter\SapiEmitter->assertNoPreviousOutput()
#2 /www/wwwroot/bbs.createchstudio.com/vendor/laminas/laminas-httphandlerrunner/src/RequestHandlerRunner.php(98): Laminas\HttpHandlerRunner\Emitter\SapiEmitter->emit()
#3 /www/wwwroot/bbs.createchstudio.com/vendor/flarum/core/src/Http/Server.php(44): Laminas\HttpHandlerRunner\RequestHandlerRunner->run()
#4 /www/wwwroot/bbs.createchstudio.com/public/index.php(26): Flarum\Http\Server->listen()
#5 {main}
thrown in <b>/www/wwwroot/bbs.createchstudio.com/vendor/laminas/laminas-httphandlerrunner/src/Exception/EmitterException.php</b> on line <b>24</b><br />`
已尝试的解决办法:
重载数据库
清除缓存
网址:
国际学生论坛