Subarist
When using Chinese characters on slug,
An error will be reported when the tag is selected .
page will crash:
http://150.230.44.1:99/t/%E5%8B%95%E5%8A%9B
` /www/wwwroot/flarum/vendor/illuminate/database/Eloquent/Builder.php
return tap($this->firstOrNew($attributes), function ($instance) use ($values) {
$instance->fill($values)->save();
});
}
/**
* Execute the query and get the first result or throw an exception.
*
* @param array $columns
* @return \Illuminate\Database\Eloquent\Model|static
*
* @throws \Illuminate\Database\Eloquent\ModelNotFoundException
*/
public function firstOrFail($columns = ['*'])
{
if (! is_null($model = $this->first($columns))) {
return $model;
}
throw (new ModelNotFoundException)->setModel(get_class($this->model));
}
/**
* Execute the query and get the first result or call a callback.
*
* @param \Closure|array $columns
* @param \Closure|null $callback
* @return \Illuminate\Database\Eloquent\Model|static|mixed
*/
public function firstOr($columns = ['*'], Closure $callback = null)
{
if ($columns instanceof Closure) {
$callback = $columns;
$columns = ['*'];
}
if (! is_null($model = $this->first($columns))) {
return $model;
}
`
GET http://150.230.44.1:99/api/tags/動力
Illuminate\Database\Eloquent\ModelNotFoundException: No query results for model [Flarum\Tags\Tag]. in /www/wwwroot/flarum/vendor/illuminate/database/Eloquent/Builder.php:527
Stack trace:
#0 /www/wwwroot/flarum/vendor/flarum/tags/src/Api/Controller/ShowTagController.php(57): Illuminate\Database\Eloquent\Builder->firstOrFail()
#1 /www/wwwroot/flarum/vendor/flarum/core/src/Api/Controller/AbstractSerializeController.php(115): Flarum\Tags\Api\Controller\ShowTagController->data()
#2 /www/wwwroot/flarum/vendor/flarum/core/src/Http/RouteHandlerFactory.php(41): Flarum\Api\Controller\AbstractSerializeController->handle()
#3 /www/wwwroot/flarum/vendor/flarum/core/src/Http/Middleware/ExecuteRoute.php(27): Flarum\Http\RouteHandlerFactory->Flarum\Http\{closure}()
#4 /www/wwwroot/flarum/vendor/laminas/laminas-stratigility/src/Next.php(51): Flarum\Http\Middleware\ExecuteRoute->process()
#5 /www/wwwroot/flarum/vendor/flarum/core/src/Api/Middleware/ThrottleApi.php(33): Laminas\Stratigility\Next->handle()
#6 /www/wwwroot/flarum/vendor/laminas/laminas-stratigility/src/Next.php(51): Flarum\Api\Middleware\ThrottleApi->process()
#7 /www/wwwroot/flarum/vendor/flarum/core/src/Http/Middleware/CheckCsrfToken.php(36): Laminas\Stratigility\Next->handle()
#8 /www/wwwroot/flarum/vendor/laminas/laminas-stratigility/src/Next.php(51): Flarum\Http\Middleware\CheckCsrfToken->process()
#9 /www/wwwroot/flarum/vendor/flarum/core/src/Http/Middleware/ResolveRoute.php(67): Laminas\Stratigility\Next->handle()
#10 /www/wwwroot/flarum/vendor/laminas/laminas-stratigility/src/Next.php(51): Flarum\Http\Middleware\ResolveRoute->process()
#11 /www/wwwroot/flarum/vendor/flarum/core/src/Http/Middleware/SetLocale.php(51): Laminas\Stratigility\Next->handle()
#12 /www/wwwroot/flarum/vendor/laminas/laminas-stratigility/src/Next.php(51): Flarum\Http\Middleware\SetLocale->process()
#13 /www/wwwroot/flarum/vendor/flarum/core/src/Http/Middleware/AuthenticateWithHeader.php(58): Laminas\Stratigility\Next->handle()
#14 /www/wwwroot/flarum/vendor/laminas/laminas-stratigility/src/Next.php(51): Flarum\Http\Middleware\AuthenticateWithHeader->process()
#15 /www/wwwroot/flarum/vendor/flarum/core/src/Http/Middleware/AuthenticateWithSession.php(31): Laminas\Stratigility\Next->handle()
#16 /www/wwwroot/flarum/vendor/laminas/laminas-stratigility/src/Next.php(51): Flarum\Http\Middleware\AuthenticateWithSession->process()
#17 /www/wwwroot/flarum/vendor/flarum/core/src/Http/Middleware/RememberFromCookie.php(52): Laminas\Stratigility\Next->handle()
#18 /www/wwwroot/flarum/vendor/laminas/laminas-stratigility/src/Next.php(51): Flarum\Http\Middleware\RememberFromCookie->process()
#19 /www/wwwroot/flarum/vendor/flarum/core/src/Http/Middleware/StartSession.php(61): Laminas\Stratigility\Next->handle()
#20 /www/wwwroot/flarum/vendor/laminas/laminas-stratigility/src/Next.php(51): Flarum\Http\Middleware\StartSession->process()
#21 /www/wwwroot/flarum/vendor/flarum/core/src/Api/Middleware/FakeHttpMethods.php(29): Laminas\Stratigility\Next->handle()
#22 /www/wwwroot/flarum/vendor/laminas/laminas-stratigility/src/Next.php(51): Flarum\Api\Middleware\FakeHttpMethods->process()
#23 /www/wwwroot/flarum/vendor/flarum/core/src/Http/Middleware/ParseJsonBody.php(28): Laminas\Stratigility\Next->handle()
#24 /www/wwwroot/flarum/vendor/laminas/laminas-stratigility/src/Next.php(51): Flarum\Http\Middleware\ParseJsonBody->process()
#25 /www/wwwroot/flarum/vendor/flarum/core/src/Http/Middleware/HandleErrors.php(57): Laminas\Stratigility\Next->handle()
#26 /www/wwwroot/flarum/vendor/laminas/laminas-stratigility/src/Next.php(51): Flarum\Http\Middleware\HandleErrors->process()
#27 /www/wwwroot/flarum/vendor/flarum/core/src/Http/Middleware/InjectActorReference.php(25): Laminas\Stratigility\Next->handle()
#28 /www/wwwroot/flarum/vendor/laminas/laminas-stratigility/src/Next.php(51): Flarum\Http\Middleware\InjectActorReference->process()
#29 /www/wwwroot/flarum/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(76): Laminas\Stratigility\Next->handle()
#30 /www/wwwroot/flarum/vendor/middlewares/request-handler/src/RequestHandler.php(84): Laminas\Stratigility\MiddlewarePipe->process()
#31 /www/wwwroot/flarum/vendor/laminas/laminas-stratigility/src/Next.php(51): Middlewares\RequestHandler->process()
#32 /www/wwwroot/flarum/vendor/middlewares/base-path-router/src/BasePathRouter.php(101): Laminas\Stratigility\Next->handle()
#33 /www/wwwroot/flarum/vendor/laminas/laminas-stratigility/src/Next.php(51): Middlewares\BasePathRouter->process()
#34 /www/wwwroot/flarum/vendor/laminas/laminas-stratigility/src/Middleware/OriginalMessages.php(36): Laminas\Stratigility\Next->handle()
#35 /www/wwwroot/flarum/vendor/laminas/laminas-stratigility/src/Next.php(51): Laminas\Stratigility\Middleware\OriginalMessages->process()
#36 /www/wwwroot/flarum/vendor/middlewares/base-path/src/BasePath.php(73): Laminas\Stratigility\Next->handle()
#37 /www/wwwroot/flarum/vendor/laminas/laminas-stratigility/src/Next.php(51): Middlewares\BasePath->process()
#38 /www/wwwroot/flarum/vendor/flarum/core/src/Http/Middleware/ProcessIp.php(24): Laminas\Stratigility\Next->handle()
#39 /www/wwwroot/flarum/vendor/laminas/laminas-stratigility/src/Next.php(51): Flarum\Http\Middleware\ProcessIp->process()
#40 /www/wwwroot/flarum/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(76): Laminas\Stratigility\Next->handle()
#41 /www/wwwroot/flarum/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(65): Laminas\Stratigility\MiddlewarePipe->process()
#42 /www/wwwroot/flarum/vendor/laminas/laminas-httphandlerrunner/src/RequestHandlerRunner.php(96): Laminas\Stratigility\MiddlewarePipe->handle()
#43 /www/wwwroot/flarum/vendor/flarum/core/src/Http/Server.php(44): Laminas\HttpHandlerRunner\RequestHandlerRunner->run()
#44 /www/wwwroot/flarum/public/index.php(26): Flarum\Http\Server->listen()
#45 {main}
Environment & details:
GET Data empty
POST Data empty
Files empty
Cookies
c9781b15c3afec051454b9e5aaaf1349 304ce177-6f29-486a-accd-ee8b9010b625.TSTz2N9Nz-Zaurk2-6pnLU9IyS0
request_token EVRz92ZIYWLEH0cBUqxlEjcs9YDpiNzRBGUxi0xiUMs5kZud
order id desc
serverType nginx
pro_end -1
ltd_end -1
memSize 23239
bt_user_info {"status":true,"msg":"%u83B7%u53D6%u6210%u529F!","data":{"username":"158****3444"}}
distribution centosL
sites_path /www/wwwroot
force 0
soft_remarks {"list":["%u4F01%u4E1A%u7248%u3001%u4E13%u4E1A%u7248%u63D2%u4EF6","15%u5929%u65E0%u7406%u7531%u9000%u6B3E","%u53EF%u66F4%u6362IP","%u8D60%u90012%u5F20%u5546%u7528%u8BC1%u4E66","%u8D60%u90011000%u6761%u77ED%u4FE1","%u4F4E%u81F32.43%u5143/%u5929","%u5546%u7528%u9632%u706B%u5899%u6388%u6743","%u5E74%u4ED8%u4F01%u4E1A%u7248%u670D%u52A1%u7FA4","%u4EA7%u54C1%u6388%u6743%u8BC1%u4E66"],"pro_list":["%u4E13%u4E1A%u7248%u63D2%u4EF6","15%u5929%u65E0%u7406%u7531%u9000%u6B3E","%u53EF%u66F4%u6362IP","%u4F4E%u81F31.18%u5143/%u5929","%u5546%u7528%u9632%u706B%u5899%u6388%u6743","%u4EA7%u54C1%u6388%u6743%u8BC1%u4E66"],"kfqq":"3007255432","kf":"http://q.url.cn/CDfQPS?_type=wpa&qidian=true","qun":"","kf_list":[{"qq":"3007255432","kf":"http://q.url.cn/CDfQPS?_type=wpa&qidian=true"},{"qq":"2927440070","kf":"http://wpa.qq.com/msgrd?v=3&uin=2927440070&site=qq&menu=yes&from=message&isappinstalled=0"}],"wx_list":[{"ps":"%u552E%u524D%u54A8%u8BE2","kf":"https://work.weixin.qq.com/kfid/kfc72fcbde93e26a6f3"}]}
pnull 1
softType 10
load_type 10
p10 1
load_page 1
site_model php
site_type -1
rank list
file_recycle_status true
record_paste null
record_paste_type null
SetName
ChangePath 14
cookieconsent_status dismiss
load_search %u8C37
Path /www/wwwroot/flarum
flarum_session ULo91EWIAZurDz5ri1aN65nQ6svGpJc2Vv206Nzv
Session empty
Server/Request Data
USER www
HOME /home/www
HTTP_COOKIE c9781b15c3afec051454b9e5aaaf1349=304ce177-6f29-486a-accd-ee8b9010b625.TSTz2N9Nz-Zaurk2-6pnLU9IyS0; request_token=EVRz92ZIYWLEH0cBUqxlEjcs9YDpiNzRBGUxi0xiUMs5kZud; order=id%20desc; serverType=nginx; pro_end=-1; ltd_end=-1; memSize=23239; bt_user_info=%7B%22status%22%3Atrue%2C%22msg%22%3A%22%u83B7%u53D6%u6210%u529F%21%22%2C%22data%22%3A%7B%22username%22%3A%22158****3444%22%7D%7D; distribution=centosL; sites_path=/www/wwwroot; force=0; soft_remarks=%7B%22list%22%3A%5B%22%u4F01%u4E1A%u7248%u3001%u4E13%u4E1A%u7248%u63D2%u4EF6%22%2C%2215%u5929%u65E0%u7406%u7531%u9000%u6B3E%22%2C%22%u53EF%u66F4%u6362IP%22%2C%22%u8D60%u90012%u5F20%u5546%u7528%u8BC1%u4E66%22%2C%22%u8D60%u90011000%u6761%u77ED%u4FE1%22%2C%22%u4F4E%u81F32.43%u5143/%u5929%22%2C%22%u5546%u7528%u9632%u706B%u5899%u6388%u6743%22%2C%22%u5E74%u4ED8%u4F01%u4E1A%u7248%u670D%u52A1%u7FA4%22%2C%22%u4EA7%u54C1%u6388%u6743%u8BC1%u4E66%22%5D%2C%22pro_list%22%3A%5B%22%u4E13%u4E1A%u7248%u63D2%u4EF6%22%2C%2215%u5929%u65E0%u7406%u7531%u9000%u6B3E%22%2C%22%u53EF%u66F4%u6362IP%22%2C%22%u4F4E%u81F31.18%u5143/%u5929%22%2C%22%u5546%u7528%u9632%u706B%u5899%u6388%u6743%22%2C%22%u4EA7%u54C1%u6388%u6743%u8BC1%u4E66%22%5D%2C%22kfqq%22%3A%223007255432%22%2C%22kf%22%3A%22http%3A//q.url.cn/CDfQPS%3F_type%3Dwpa%26qidian%3Dtrue%22%2C%22qun%22%3A%22%22%2C%22kf_list%22%3A%5B%7B%22qq%22%3A%223007255432%22%2C%22kf%22%3A%22http%3A//q.url.cn/CDfQPS%3F_type%3Dwpa%26qidian%3Dtrue%22%7D%2C%7B%22qq%22%3A%222927440070%22%2C%22kf%22%3A%22http%3A//wpa.qq.com/msgrd%3Fv%3D3%26uin%3D2927440070%26site%3Dqq%26menu%3Dyes%26from%3Dmessage%26isappinstalled%3D0%22%7D%5D%2C%22wx_list%22%3A%5B%7B%22ps%22%3A%22%u552E%u524D%u54A8%u8BE2%22%2C%22kf%22%3A%22https%3A//work.weixin.qq.com/kfid/kfc72fcbde93e26a6f3%22%7D%5D%7D; pnull=1; softType=10; load_type=10; p10=1; load_page=1; site_model=php; site_type=-1; rank=list; file_recycle_status=true; record_paste=null; record_paste_type=null; SetName=; ChangePath=14; cookieconsent_status=dismiss; load_search=%u8C37; Path=/www/wwwroot/flarum; flarum_session=ULo91EWIAZurDz5ri1aN65nQ6svGpJc2Vv206Nzv
HTTP_ACCEPT_LANGUAGE zh-TW,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6,zh-CN;q=0.5
HTTP_ACCEPT_ENCODING gzip, deflate
HTTP_ACCEPT text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
HTTP_USER_AGENT Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.64 Safari/537.36 Edg/101.0.1210.47
HTTP_UPGRADE_INSECURE_REQUESTS 1
HTTP_CACHE_CONTROL max-age=0
HTTP_CONNECTION keep-alive
HTTP_HOST 150.230.44.1:99
PATH_INFO
REDIRECT_STATUS 200
SERVER_NAME 150.230.44.1
SERVER_PORT 99
SERVER_ADDR 10.0.0.47
REMOTE_PORT 34369
REMOTE_ADDR 49.216.43.131
SERVER_SOFTWARE nginx/1.20.2
GATEWAY_INTERFACE CGI/1.1
REQUEST_SCHEME http
SERVER_PROTOCOL HTTP/1.1
DOCUMENT_ROOT /www/wwwroot/flarum/public
DOCUMENT_URI /index.php
REQUEST_URI /t/%E5%8B%95%E5%8A%9B
SCRIPT_NAME /index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING
SCRIPT_FILENAME /www/wwwroot/flarum/public/index.php
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1652860282.2047
REQUEST_TIME 1652860282
Environment Variables empty
Registered Handlers
0. Whoops\Handler\PrettyPageHandler