We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit ba2390d2 authored by Mike Sheldon's avatar Mike Sheldon

Fix json output when all we have is an lfm node (e.g. when just giving status=ok messages)

parent d35faa66
......@@ -29,7 +29,7 @@ class JSONEncoder {
* @return A JSON formatted string
public static function encodeXML($xml) {
if($xml->getName() == 'lfm') {
if($xml->getName() == 'lfm' && count($xml->children())) {
$xml = $xml->children();
$json_data[$xml->getName()] = JSONEncoder::recursivelyEncodeXML($xml);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment