CRM-14434 - Further cleanup
authorColeman Watts <coleman@civicrm.org>
Mon, 11 Aug 2014 19:06:55 +0000 (20:06 +0100)
committerColeman Watts <coleman@civicrm.org>
Mon, 11 Aug 2014 19:06:55 +0000 (20:06 +0100)
CRM/Core/BAO/Note.php
CRM/Report/Form/Event/ParticipantListing.php

index 667a94c2f46ae7f853149370b0f5e11710d070be..2e27bdacc2598f13115041ecc3f43a4961572e7a 100644 (file)
@@ -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']);
index 11754022a69d7cd5d83e73361a5130048e98dc4d..554a742671a0c5993eb8ee072f4ebcbc0282c130 100644 (file)
@@ -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)) {