Re: RFE: trigger_error()
| From: | Sebastian Bergmann | Date: | Mon, 27 Jan 2003 13:19:02 +0000 |
| Subject: | Re: RFE: trigger_error() | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-93707@lists.php.net to get a copy of this message | ||
Zeev Suraski wrote:
> Why?
Because
<?php
class Object {
// ...
protected function __set($memberName, $value) {
$stacktrace = debug_backtrace();
printf(
'Notice: Undefined property: %s in %s on line %s',
$memberName,
$stacktrace[sizeof($stacktrace)-1]['file'],
$stacktrace[sizeof($stacktrace)-1]['line']
);
}
}
$o = new Object;
$o->test = 'test';
?>
bypasses the PHP error system.
--
Sebastian Bergmann
http://sebastian-bergmann.de/ http://phpOpenTracker.de/
Did I help you? Consider a gift: http://wishlist.sebastian-bergmann.de/