0

I get this error while in the Configure Event -> Online Registration tab and trying to enable the Send Confirmation Email feature:

Warning: idn_to_ascii() expects parameter 3 to be integer, string given in /home2/nymissionary/public_html/administrator/components/com_civicrm/civicrm/packages/HTML/QuickForm/Rule/Email.php on line 58

A screenshot is shown below. I need your help so I can use this feature.

~ Ron

enter image description here

2

It looks like this issue has been reported and fixed here: https://lab.civicrm.org/dev/core/issues/1469

With this patch https://github.com/civicrm/civicrm-packages/pull/271.patch

To apply.

First make up a backup of the file.

Then option one - if you have command line access you would want to

navigate to

/home2/nymissionary/public_html/administrator/components/com_civicrm/civicrm/packages/

Download the patch using wget

wget https://patch-diff.githubusercontent.com/raw/civicrm/civicrm-packages/pull/271.patch

This will create a file called 271.patch

Then you want to apply the patch using the patch command

patch -p1 < 271.patch

( What this does

  1. use the patch command
  2. strip off the first 1 bit of the path when searching for the files (in this case the a and the b from a/HTML/QuickForm/Rule/Email.php b/HTML/QuickForm/Rule/Email.php )
  3. and read in the file you downloaded to get the instructions on what to do.

)

In this case it looks like a pretty simple patch that you could do manually if you were more comfortable.

Again make a backup of the file then edit the file: HTML/QuickForm/Rule/Email.php

Then look at https://patch-diff.githubusercontent.com/raw/civicrm/civicrm-packages/pull/271.patch

What you want to do is add any line (without the +) that starts with a plus and remove anything with a minus.

You want to add the code between the lines without the pluses above and below so the first chunk will go in about line 37.

after

class HTML_QuickForm_Rule_Email extends HTML_QuickForm_Rule {

but before // switching to a better regex as per CRM-40

Then the second bit you just need to swap

$part = idn_to_ascii($part, 0, INTL_IDNA_VARIANT_UTS46); for $part = self::idn_to_ascii($part);

If you get any errors after saving just revert to your backup.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.