Fix a notice when setting a picture description via API

This commit is contained in:
Michael 2019-08-02 16:43:36 +00:00
parent e9f0c4dbfb
commit 5dc74513cc
1 changed files with 6 additions and 4 deletions

View File

@ -343,11 +343,13 @@ function api_call(App $a)
break;
case "json":
header("Content-Type: application/json");
$json = json_encode(end($return));
if (!empty($_GET['callback'])) {
$json = $_GET['callback'] . "(" . $json . ")";
if (!empty($return)) {
$json = json_encode(end($return));
if (!empty($_GET['callback'])) {
$json = $_GET['callback'] . "(" . $json . ")";
}
$return = $json;
}
$return = $json;
break;
case "rss":
header("Content-Type: application/rss+xml");