notice fixes
authorkurund <kurund@civicrm.org>
Tue, 8 Apr 2014 00:43:27 +0000 (17:43 -0700)
committerkurund <kurund@civicrm.org>
Tue, 8 Apr 2014 00:43:27 +0000 (17:43 -0700)
CRM/PCP/Page/PCPInfo.php

index f26571ec56ac641325e57c5f4f4a27abddd804e7..c41c626e61db13aa6094829ffa60213375bd518e 100644 (file)
@@ -194,7 +194,9 @@ class CRM_PCP_Page_PCPInfo extends CRM_Core_Page {
 
     $honor = CRM_PCP_BAO_PCP::honorRoll($this->_id);
 
-    if ($fileInfo = reset(CRM_Core_BAO_File::getEntityFile('civicrm_pcp', $this->_id))) {
+    $entityFile = CRM_Core_BAO_File::getEntityFile('civicrm_pcp', $this->_id);
+    if (!empty($entityFile)) {
+      $fileInfo = reset($entityFile);
       $fileId = $fileInfo['fileID'];
       $image = '<img src="' . CRM_Utils_System::url('civicrm/file',
         "reset=1&id=$fileId&eid={$this->_id}"