note 12961 deleted from function.set-error-handler by sniper
| From: | sniper@php.net | Date: | Fri, 03 Oct 2003 05:34:58 +0000 |
| Subject: | note 12961 deleted from function.set-error-handler by sniper | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-57645@lists.php.net to get a copy of this message | ||
Note Submitter: neo@_no_spam_apt7.com
----
Please note that when you define your error-handling function, you cannot specify that any
parameters are passed by reference.
For instance:
function handleErrors($code, $str, $file, $line, &$context) {
...
}
set_error_handler('handleErrors');
will cause PHP to seg-fault in Apache/PHP(DSO).
I'm assuming that the error-generating code in the Zend core indiscriminantly calls the
error-handling function with all parameters passed by value b/c it expects this to be the case.
Just to save any efficiency freaks like me the few hours that I spent trackign this error down.