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

Redeclare of Error class in PHP7 #61

Open
uaktags opened this issue May 1, 2016 · 3 comments
Open

Redeclare of Error class in PHP7 #61

uaktags opened this issue May 1, 2016 · 3 comments

Comments

@uaktags
Copy link

uaktags commented May 1, 2016

I seem to be getting an error that the Error class is already in use, so any of the validation functions seem to fail. This is apparently due to PHP7 as can be read in the manual https://secure.php.net/manual/en/class.error.php

Something to keep an eye on. We must rename our error class.

@uaktags
Copy link
Author

uaktags commented May 1, 2016

Change line 77 in Applications/core/My_Controller.php from:
$redirect_url = empty($this->mModule) ? 'error' : $this->mModule.'/error';
to
$redirect_url = empty($this->mModule) ? 'myerror' : $this->mModule.'/myerror';

Rename Applications/controllers/Error.php to Applications/controllers/Myerror.php

Rename the class in Applications/controllers/Myerror.php from "class Error" to "class Myerror"

Edit as needed. Don't use "myerror" -_-

@waifung0207
Copy link
Owner

Thanks for the issue. I will further check with this, and I would prefer rename it to something like "NotFound" instead.

@uaktags
Copy link
Author

uaktags commented May 9, 2016

Definitely:
Here's a solution, rename the error controller to syserr or "NotFound" as you suggested:
application/config/routes.php:

$route['error/']                         = 'syserr/';

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

No branches or pull requests

2 participants