Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-14431

send report api function exits rather than returning (this can mess up scheduled jobs)

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.4.4
    • Fix Version/s: 4.5
    • Component/s: None
    • Labels:
      None

      Description

      In the endPostProcess if
      if ($this->_sendmail) {

      then after sending the mail it redirects
      CRM_Utils_System::redirect(CRM_Utils_System::url(CRM_Utils_System::currentPath(), 'reset=1'));

      Since send mail ONLY happens in a job as far as I know this behaviour is ALWAYS inappropriate & can derail a php process (e.g running all scheduled jobs).

      Replacing the above with 'return' seems to help - in that the redirect no longer happens - although I still get html output when calling from drush (not sure why)

        Attachments

          Activity

            People

            • Assignee:
              deepak Deepak Srivastava
              Reporter:
              eileen Eileen McNaughton
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: