Metadata should be an object.

This commit is contained in:
Michael Vogel 2015-08-10 23:11:07 +02:00
parent 6aeb4c0ad7
commit e60456fb66

View File

@ -113,7 +113,7 @@ function nodeinfo_init(&$a){
$nodeinfo["usage"]["localPosts"] = (int)get_config("nodeinfo","local_posts"); $nodeinfo["usage"]["localPosts"] = (int)get_config("nodeinfo","local_posts");
$nodeinfo["usage"]["localComments"] = (int)get_config("nodeinfo","local_comments"); $nodeinfo["usage"]["localComments"] = (int)get_config("nodeinfo","local_comments");
$nodeinfo["usage"]["metadata"] = array(); $nodeinfo["metadata"] = new stdClass();
header('Content-type: application/json; charset=utf-8'); header('Content-type: application/json; charset=utf-8');
echo json_encode($nodeinfo, JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES); echo json_encode($nodeinfo, JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES);