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

Possible redeclaration #51

Open
registrobr opened this issue Mar 4, 2015 · 4 comments
Open

Possible redeclaration #51

registrobr opened this issue Mar 4, 2015 · 4 comments
Assignees
Labels
Milestone

Comments

@registrobr
Copy link
Collaborator

Fatal error: Cannot redeclare class idna_convert in /home//public_html/core/modules/registrars/registrobr/Idna/idna_convert.class.php on line 54

Issue happened in a single installation, hasn't be reproduced. idna_convert is instanced with require_once so this shouldn't occur.

@registrobr
Copy link
Collaborator Author

Solving issue #38 might also address this issue, provided it's really an issue

@rubenskuhl
Copy link
Contributor

Occurred in another installation.
Fatal error: Cannot redeclare class idna_convert in /home//public_html/home/modules/registrars/registrobr/Idna/idna_convert.class.php on line 54

@pablosbs
Copy link

I fixed the issue replacing the follow code at the file RegistroEPP> RegistroEPP.class.php
I changed the line :
require_once('Idna/idna_convert.class.php');
to
if (!class_exists('idna_convert')) require_once('Idna/idna_convert.class.php');

This change fixed the issue at my instalation.

@rubenskuhl
Copy link
Contributor

Very good to know Pablo. Wasn't the purpose of "require_once" to do just that ? Just wondering whether other class declarations should have the same safeguards.

@rubenskuhl rubenskuhl added this to the v7.0 milestone Mar 28, 2019
@rubenskuhl rubenskuhl modified the milestones: v7.0, 8.0 version Apr 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants