Hi there i'm having a bit of a problem and im sure that thousands of people must have encountered the same thing.
I have an error handler class like this
[PHP
class Error {
// constructor
function Error(){
set_error_handler($this->Handler);
}
// methods
function Handler($errorNo,$errorStr,$errorFile,$errorLine){
// bla print out the error etc.
}
}// end class
[/code]
ok ..., so the trouble is if you've not spotted it already is when i use 'set_error_handler' above i'm not properly referencing the Handler, but i'm not sure why it's going wrong....
error msg returned is this:
Notice: Undefined property: AssignError in D:\Apache2\htdocs\php-bin\Error.php on line 56
Warning: set_error_handler() expects argument 1, '', to be a valid callback in D:\Apache2\htdocs\php-bin\Error.php on line 56
anyone have any ideas?, or maybe I can't have the error handler inside a class?? 😕