Fix a notice when setting a picture description via API
This commit is contained in:
parent
e9f0c4dbfb
commit
5dc74513cc
|
@ -343,11 +343,13 @@ function api_call(App $a)
|
||||||
break;
|
break;
|
||||||
case "json":
|
case "json":
|
||||||
header("Content-Type: application/json");
|
header("Content-Type: application/json");
|
||||||
|
if (!empty($return)) {
|
||||||
$json = json_encode(end($return));
|
$json = json_encode(end($return));
|
||||||
if (!empty($_GET['callback'])) {
|
if (!empty($_GET['callback'])) {
|
||||||
$json = $_GET['callback'] . "(" . $json . ")";
|
$json = $_GET['callback'] . "(" . $json . ")";
|
||||||
}
|
}
|
||||||
$return = $json;
|
$return = $json;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case "rss":
|
case "rss":
|
||||||
header("Content-Type: application/rss+xml");
|
header("Content-Type: application/rss+xml");
|
||||||
|
|
Loading…
Reference in New Issue
Block a user