$hints = array(
CRM_Core_Action::UPDATE => ts('Change the content and appearance of your page'),
CRM_Core_Action::DETACH => ts('Send emails inviting your friends to support your campaign!'),
$hints = array(
CRM_Core_Action::UPDATE => ts('Change the content and appearance of your page'),
CRM_Core_Action::DETACH => ts('Send emails inviting your friends to support your campaign!'),
CRM_Core_Action::BROWSE => ts('Update your personal contact information'),
CRM_Core_Action::DISABLE => ts('De-activate the page (you can re-activate it later)'),
CRM_Core_Action::ENABLE => ts('Activate the page (you can de-activate it later)'),
CRM_Core_Action::BROWSE => ts('Update your personal contact information'),
CRM_Core_Action::DISABLE => ts('De-activate the page (you can re-activate it later)'),
CRM_Core_Action::ENABLE => ts('Activate the page (you can de-activate it later)'),
- 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}"
$fileId = $fileInfo['fileID'];
$image = '<img src="' . CRM_Utils_System::url('civicrm/file',
"reset=1&id=$fileId&eid={$this->_id}"