Support » Plugin: AMP » PHP 7.2 Deprecation Error

  • Resolved Jacob McKinney


    I am getting the following error on the post edit screen:

    Deprecated: idn_to_utf8(): INTL_IDNA_VARIANT_2003 is deprecated in /home/tipsonlifeandlov/public_html/wp-content/plugins/amp/includes/class-amp-http.php on line 208

    It looks like the INTL_IDNA_VARIANT_2003 constant has been deprecated since PHP 7.2 and should be replaced with INTL_IDNA_VARIANT_UTS46 (PHP manual reference).

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Weston Ruter


    What version of the plugin are you using?

    This should have been fixed in v1.1 via

    We are on version 1.1.1

    I see that line in our current plugin, so it seems odd that we are getting the error.

    We are on PHP 7.2.17 but it seems to be acting like INTL_IDNA_VARIANT_UTS46 isn’t defined. I’ll do some digging on our end.

    @westonruter the issue seems to be with the PHP installation on our server. We are working on a fix.

    Thanks for the quick response!

    Plugin Author Pascal Birchler


    This typically happens when the version of PHP has been compiled with an older version of ICU.

    @swissspidy thanks for that insight.


    I start getting the same error when open a post to edit, class-amp-http.php but on line 233. Looks like it starts after the latest plugin update. I have php 7.3

    Plugin Author Pascal Birchler


    @edwardsh Might be the same issue – new PHP version compiled with an old version of ICU. I suggest contacting your hosting provider to get this fixed.


    thanks for your reply. How can I check out the ICU version? Is this possible via WP or Plesk console ? I have no ways to ask my hosting provider.

    Plugin Author Pascal Birchler


    @edwardsh You would need to somehow display information about your PHP version using “PHP Info” (<?php phpinfo(); ?> or php -i on the command line). Unfortunately I don’t know how this is doable in Plesk console.

    The relevant part should look like this:

    Internationalization support => enabled
    ICU version => 63.1
    ICU Data version => 63.1
    ICU TZData version => 2018e
    ICU Unicode version => 11.0
    Directive => Local Value => Master Value
    intl.default_locale => no value => no value
    intl.error_level => 0 => 0
    intl.use_exceptions => 0 => 0

    The relevant part is the ICU version there.

    If the version is too old, it would look like this:

Viewing 9 replies - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.