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

Fatal error: Uncaught exception 'ezcBasePropertyNotFoundException' with message 'No such property name 'subType'.'

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 2.1.4
    • Fix Version/s: 2.1.5, 2.2.0
    • Component/s: CiviMail
    • Labels:
      None

      Description

      I'm using 2.1.4, however, with the CiviMailProcessor code... When running the script to process emails via the CiviCRM Mail Processor some emails fail with a fatal error and prevent the script from completing:

      Fatal error: Uncaught exception 'ezcBasePropertyNotFoundException' with message 'No such property name 'subType'.' in /var/www/x.org/sites/all/modules/civicrm/packages/ezc/Mail/src/interfaces/part.php:118 Stack trace: #0 /var/www/x.org/sites/all/modules/civicrm/packages/ezc/Mail/src/parts/delivery_status.php(101): ezcMailPart->_get('subType') #1 /var/www/x.org/sites/all/modules/civicrm/bin/CiviMailProcessor.php(77): ezcMailDeliveryStatus->_get('subType') #2 /var/www/x.org/sites/all/modules/civicrm/bin/CiviMailProcessor.php(141): CiviMailProcessor->process() #3

      {main}

      thrown in /var/www/x.org/sites/all/modules/civicrm/packages/ezc/Mail/src/interfaces/part.php on line 118

      I contacted ez Components and they said that only the ezcMailText property has SubParts. Thus, inserting the check: if ( $part instanceof ezcMailText ) {... fixes this issue as far as I am concerned. Here is the chunk of code below from CiviMailProcessor.php (sorry, I don't have a good patch utility on this machine):

      // for bounces and replies get the plaintext and HTML parts of the message
      // FIXME: this assumes only one plain and one html part per message (and discards the rest)
      if (in_array($action, array('b', 'bounce', 'r', 'reply'))) {
      $text = $html = null;
      if ($mail->body instanceof ezcMailText)

      { $text = $mail->body->text; }

      elseif ($mail->body instanceof ezcMailMultipart) {
      foreach ($mail->body->getParts() as $part) {
      if ( $part instanceof ezcMailText ) {
      switch ($part->subType)

      { case 'plain': $text = $part->text; break; case 'html': $html = $part->text; break; }

      }
      }
      }
      }

        Attachments

          Activity

            People

            • Assignee:
              sushant Sushant Paste
              Reporter:
              pcorbett Patrick Corbett
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: