* @return array Nested associative array beginning with direct children of given note.
* @static
*/
- private static function buildNoteTree($parentId, $maxDepth = 0, $snippet = FALSE, &$tree = array(
- ), $depth = 0) {
+ private static function buildNoteTree($parentId, $maxDepth = 0, $snippet = FALSE, &$tree = array(), $depth = 0) {
if ($maxDepth && $depth > $maxDepth) {
return false;
}
// paper icon view for attachments part
$paperIconAttachmentInfo = CRM_Core_BAO_File::paperIconAttachment('civicrm_note', $note->id);
- $tree[$note->id]['attachment'] = implode('', $paperIconAttachmentInfo);
+ $tree[$note->id]['attachment'] = $paperIconAttachmentInfo ? implode('', $paperIconAttachmentInfo) : '';
if ($snippet) {
$tree[$note->id]['note'] = nl2br($tree[$note->id]['note']);