* @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']);
// convert display name to links
if (array_key_exists('civicrm_participant_event_id', $row)) {
$eventId = $row['civicrm_participant_event_id'];
- if ($eventId]) {
+ if ($eventId) {
$rows[$rowNum]['civicrm_participant_event_id'] = CRM_Event_PseudoConstant::event($eventId, FALSE);
$url = CRM_Report_Utils_Report::getNextUrl('event/income',
}
// handle event type id
- $this->_initBasicRow(&$rows, &$entryFound, $row, 'civicrm_event_event_type_id', $rowNum, $eventType);
+ $this->_initBasicRow($rows, $entryFound, $row, 'civicrm_event_event_type_id', $rowNum, $eventType);
// handle participant status id
if (array_key_exists('civicrm_participant_status_id', $row)) {