mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 15:45:56 +00:00
fail better if Feeds.view() data failed encoding to JSON
This commit is contained in:
@@ -563,7 +563,14 @@ class Feeds extends Handler_Protected {
|
||||
// this is parsed by handleRpcJson() on first viewfeed() to set cdm expanded, etc
|
||||
$reply['runtime-info'] = make_runtime_info();
|
||||
|
||||
print json_encode($reply);
|
||||
$reply_json = json_encode($reply);
|
||||
|
||||
if (!$reply_json) {
|
||||
$reply_json = json_encode(["error" => ["code" => 15,
|
||||
"message" => json_last_error_msg()]]);
|
||||
}
|
||||
|
||||
print $reply_json;
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user