Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use of undefined constant IDNA_NONTRANSITIONAL_TO_ASCII - assumed 'IDNA_NONTRANSITIONAL_TO_ASCII' #4722

Closed
evjohns-jfd opened this issue Aug 7, 2019 · 1 comment

Comments

@evjohns-jfd
Copy link

evjohns-jfd commented Aug 7, 2019

Description

Error in:
/vendor/craftcms/cms/src/web/Request.php

line 1157:

if (
    !empty($parsed['host']) &&
    $hostName &&
    $parsed['host'] !== $hostName &&
  (
     !function_exists('idn_to_ascii') ||
     idn_to_ascii($parsed['host'], IDNA_NONTRANSITIONAL_TO_ASCII, INTL_IDNA_VARIANT_UTS46) !== $hostName
    )
) {
     continue;
}

Error:

Use of undefined constant IDNA_NONTRANSITIONAL_TO_ASCII - assumed 'IDNA_NONTRANSITIONAL_TO_ASCII'

Steps to reproduce

  1. Set the sites base domain and then visit a different domain.
    e.g. set base domain to example.com then visit www.example.com

Additional info

  • Craft version: Craft Pro 3.2.9
  • PHP version: 7.1.31
  • Database driver & version: MySQL 5.5.62
  • Plugins & versions:

Amazon S3: 1.2.5
Redactor: 2.3.3.2
Supertable: 2.2.1
Amazon S3: 1.0.9

@brandonkelly
Copy link
Member

Just fixed this for the next release.

To get the fix early, change your craftcms/cms requirement in composer.json to:

"require": {
  "craftcms/cms": "dev-develop#259297cd890398c3ac16946b7c898b2ad040dbbe as 3.2.9",
  "...": "..."
}

Then run composer update.

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

No branches or pull requests

2 participants