Welcome Guest, Not a member yet? Register   Sign In
Declaration of MY_Exceptions::show_error() should be compatible with that of CI_Exceptions::show_error()
#1

[eluser]skunkbad[/eluser]
An error occurred in script '/home/brians6/public_html/application/libraries/MY_Exceptions.php' on line 18:


Anyone know what is wrong here:

Code:
<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
define("BASE", "http://www.brianswebdesign.com");
//define("BASE", "http://rbg72.web/newBWD");
class MY_Exceptions extends CI_Exceptions {

    public function show_error($heading, $message, $template = 'error_general'){
        header("HTTP/1.0 404 Not Found");
        if (ob_get_level() > $this->ob_level + 1){
            ob_end_flush();    
        }
        ob_start();
        echo(file_get_contents( BASE .'/errorpage'));
        $buffer = ob_get_contents();
        ob_end_clean();
        return $buffer;
    }

}
/* End of file MY_Exceptions.php */
/* Location: .application/libraries/MY_Exceptions.php */
#2

[eluser]jedd[/eluser]
Is line 18 really the comment line?

What happens if you put the fourth parameter (status code) into your function declaration?
#3

[eluser]skunkbad[/eluser]
I updated the file with 1.7.2 code. So far no errors. What is really weird is that I woke up this morning to an email from my host telling me that they had to emergency move my account to another server. Apparently changes that I made had "almost crashed the server". They said the only clue they could give me was that their monitor pointed to the php process.

I did see some errors in my error_log, but everything seems to work normally, and I have no clue why they are saying there is a problem. My development server has no issues, and usually if I make a mistake it crashes quite easily, so... I guess I have to stay in close contact with them and try to figure out if the problem persists.




Theme © iAndrew 2016 - Forum software by © MyBB