Skip to content
This repository has been archived by the owner on Jul 20, 2022. It is now read-only.

PHP Fatal error: Cannot break/continue 1 level in Mandrill.php on line 349 #93

Open
shawnholt opened this issue Aug 5, 2015 · 7 comments

Comments

@shawnholt
Copy link

Using PHP 5.5.27

I believe the 'continue' should be a 'return' (btw i only found this by looking at the php error_log in the drupal root - might want to do some kind of reporting)

public static function createActivity($value, $context = NULL, &$header = array()) {
$sourceContactId = self::retrieveEmailContactId($value['msg']['sender'], TRUE);
if (!CRM_Utils_Array::value('contact_id', $sourceContactId['email'])) {
continue;
}

@shawnholt shawnholt reopened this Oct 2, 2015
@shawnholt
Copy link
Author

This is definitely giving a contributor to the HTTP 500 error.
If I change "continue' to 'return' it goes away (THIS IS A HACK!) I don't know if it isupposed to be 'return' or something else was intended.
PHP error I see is : PHP Fatal error: Cannot break/continue 1 level in /home/xxxxx/public_html/drupal/sites/default/files/civicrm/extensions/biz.jmaconsulting.mte/CRM/Mte/BAO/Mandrill.php on line 349

@shawnholt
Copy link
Author

NOTE this is not a fix! It is a HACK to avoid the 500 errors.

@ginkgomzd
Copy link

Reviewing this function, it seems clear that this is not just a hack but indeed the proper fix.

@shawnholt
Copy link
Author

No more 500 error but bounce did not process for contact - could be related to a different error. perhaps you can comment or refactor so it is clear why the function is returning here. I was never able to successfully get bounce processing to work.

@ginkgomzd
Copy link

Please help test. #98

@vakeesan26
Copy link

tested on CiviCRM 4.5.6 - WP 4.2.5
and CiviCRM 4.6.10 - Drupal 7
its working fine
thank you @ginkgomzd

@pradpnayak
Copy link
Contributor

Can you please update the extension and check if still get error

Here is the download link:
https://github.com/JMAConsulting/biz.jmaconsulting.mte/archive/v2.1.beta.zip

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants