ci_bootstrap_3 icon indicating copy to clipboard operation
ci_bootstrap_3 copied to clipboard

Redeclare of Error class in PHP7

Open uaktags opened this issue 8 years ago • 3 comments

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 avatar May 01 '16 14:05 uaktags

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" -_-

uaktags avatar May 01 '16 14:05 uaktags

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

waifung0207 avatar May 09 '16 04:05 waifung0207

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

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

uaktags avatar May 09 '16 13:05 uaktags