Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

2.X to 3.0 ci_exceptions redeclared issue #1872

Closed
ckdarby opened this Issue · 9 comments

2 participants

@ckdarby

This file is currently working in 2.1.3(Along with the 2.X series) but when upgrading to 3.0(6d9915a) it starts to complain about the following

Fatal error: require_once(): Cannot redeclare class ci_exceptions in /home/ckdarby/www/aims/system/core/Loader.php on line 304

Here is the attached logger: https://gist.github.com/3866332

I think this happens when you load two models that both extend MY_Model but I haven't had time to confirm this. I am just wondering if anyone else has bumped into the same issue as me.

@ckdarby

This appears to happen when there's E_STRICT "Declaration of … should be compatible with that of …” error from not writing functions with matching parameters from the extending MY_Model

@narfbg
Owner

The one differs from the other ... so which one is it?

@ckdarby

@narfbg This is from when you end up causing a E_STRICT Declaration of X should be compatible in the model...this error will cause ci_exceptions to reload itself & cause a PHP fatal instead of a runtime warning that is caused by the E_STRICT

@narfbg
Owner

OK. Is that E_STRICT caused by CodeIgniter or your own code?

@ckdarby

The E_STRICT is caused by my own code but it causes CI's loader to redeclared CI_Exception which causes a PHP fatal error

@narfbg
Owner

How about now?

@ckdarby

Nope

Fatal error: require_once(): Cannot redeclare class ci_exceptions in /home/ckdarby/www/codeigniter/system/core/Loader.php on line 304

@narfbg
Owner

Can you try tracking it down then? I did a grep for 'require ', 'require ', 'include ', 'include(' and after that last commit - it's only config files that are not loaded via the *_once() functions, so I don't see how this could happen.

@ckdarby

I am going to close this as this issue didn't happen in a recent upgrade we did in January.

@ckdarby ckdarby closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.