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

Bug fix: ensure to use autoload = false in class_exists() in low-hanging fruit in Factories::locateClass() #3772

Merged
merged 2 commits into from
Oct 15, 2020

Conversation

samsonasik
Copy link
Member

@samsonasik samsonasik commented Oct 15, 2020

I tried latest dev-develop when running test in a codeigniter4 module and without set autoload=false in 2nd parameter of class_exists() in Factories::locateClass(), I got the error:

Cannot declare class Config\App, because the name is already in use

at APPPATH/Config/App.php:7

Backtrace:
  1    [internal function]
       CodeIgniter\Debug\Exceptions()->shutdownHandler()


Fatal error: Cannot declare class Config\App, because the name is already in use in /Users/samsonasik/www/codeigniter4-files/vendor/codeigniter4/codeigniter4/app/Config/App.php on line 7

This patch fixed the issue.

Checklist:

  • Securely signed commits

@samsonasik
Copy link
Member Author

@MGatner above error happen when I tried to test your codeigniter4-files module in php 7.4.9. Update the autoload to false in 2nd class_exists above fix the issue.

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

Successfully merging this pull request may close these issues.

1 participant