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

Symphony Deprecated Warning: idn_to_ascii(): INTL_IDNA_VARIANT_2003 is deprecated #2910

Open
bauhouse opened this issue Mar 27, 2020 · 2 comments

Comments

@bauhouse
Copy link
Member

Affected Symphony version(s) : 3.0.0
PHP version(s) : 7.3.7
MySQL version(s): 5.7.26 Homebrew
OS(es) : macOS Catalina 10.15.3

Accessing the symphony admin returned the following error:

Symphony Deprecated Warning: idn_to_ascii(): INTL_IDNA_VARIANT_2003 is deprecated

An error occurred in /Users/stephen/Sites/symphonycms/symphony/lib/boot/func.utilities.php around line 28

23     // convert idn back to ascii for redirect
24 
25     if (function_exists('idn_to_ascii')) {
26         $root = parse_url(URL);
27         $host = $root['host'];
28         $url  = str_replace($host, idn_to_ascii($host), $url);
29     }
30 
31     cleanup_session_cookies();
32     header('Status: 302 Found');

The error was solved by changing line 28 of func.utilities.php from this:

$url  = str_replace($host, idn_to_ascii($host), $url);	

to this:

$url  = str_replace($host, idn_to_ascii($host,0,INTL_IDNA_VARIANT_UTS46), $url);

based on a similar error reported here.

@wdebusschere
Copy link

where do you get this error?

nitriques added a commit that referenced this issue Mar 30, 2020
Since we do not support php 5.4, we can safely use the required version
for php 7.2.

Fixes #2910
@nitriques
Copy link
Member

@bauhouse Seems like we patch it in defines but not in functions. I've push a commit if you want to try the fix

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

No branches or pull requests

3 participants