This could be a simple fix:
in applications/models/Leaves_model.php
*** 681,686 ****
--- 681,687 ----
if (isset($json_parsed)){
array_push($json_parsed->comments, $commentObject);
}else {
+ $json_parsed = new stdClass;
$json_parsed->comments = array($commentObject);
}
$comment_change = new stdClass;