Merge pull request #7459 from annando/notice

Fix a notice when setting a picture description via API
This commit is contained in:
Hypolite Petovan 2019-08-02 13:26:47 -04:00 committed by GitHub
commit 6c4fea5e6c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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");