Restored old site but new errors shown |
I'm not sure why it worked before and now it's not. But it's not good practice to access a variable defined in another file and taking for granted that the variable will exist and be accessible. There may be a setting in php.ini that prevent this behavior and keep the scope to a single file?
But anyway, loading a library with require_once in the constructor, then trying to access $this->options is very bad coding. It would be best to properly load the library, then change this code to a function that return a value and assign that value to $options in MY_Controller class. ...in fact, this may be in the "libraries" folder, but it's really a configuration file and not a library. This look like it was hacked together by someone that knows nothing about CodeIgniter. You better fix this nonsense the right way or you'll end up with a lot of weird bug like this. |
Messages In This Thread |
Restored old site but new errors shown - by Inquisitor - 09-06-2021, 06:34 AM
RE: Restored old site but new errors shown - by includebeer - 09-06-2021, 02:48 PM
RE: Restored old site but new errors shown - by Inquisitor - 09-06-2021, 02:55 PM
RE: Restored old site but new errors shown - by Inquisitor - 09-08-2021, 03:44 AM
RE: Restored old site but new errors shown - by InsiteFX - 09-07-2021, 01:28 AM
RE: Restored old site but new errors shown - by kleber - 09-08-2021, 07:42 PM
RE: Restored old site but new errors shown - by Inquisitor - 09-08-2021, 11:59 PM
RE: Restored old site but new errors shown - by InsiteFX - 09-09-2021, 02:06 AM
RE: Restored old site but new errors shown - by Inquisitor - 09-09-2021, 02:22 AM
RE: Restored old site but new errors shown - by includebeer - 09-10-2021, 02:39 PM
|