From 1a3fb0ced04dcadd14826d61b84ea5acf66165ad Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Mon, 11 Aug 2014 20:06:55 +0100 Subject: [PATCH] CRM-14434 - Further cleanup --- CRM/Core/BAO/Note.php | 5 ++--- CRM/Report/Form/Event/ParticipantListing.php | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/CRM/Core/BAO/Note.php b/CRM/Core/BAO/Note.php index 667a94c2f4..2e27bdacc2 100644 --- a/CRM/Core/BAO/Note.php +++ b/CRM/Core/BAO/Note.php @@ -463,8 +463,7 @@ ORDER BY modified_date desc"; * @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; } @@ -492,7 +491,7 @@ ORDER BY modified_date desc"; // 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']); diff --git a/CRM/Report/Form/Event/ParticipantListing.php b/CRM/Report/Form/Event/ParticipantListing.php index 11754022a6..554a742671 100644 --- a/CRM/Report/Form/Event/ParticipantListing.php +++ b/CRM/Report/Form/Event/ParticipantListing.php @@ -641,7 +641,7 @@ GROUP BY cv.label // 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', @@ -655,7 +655,7 @@ GROUP BY cv.label } // 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)) { -- 2.25.1