Re: incomplete-object-patch I
| From: | Sascha Schumann | Date: | Fri, 23 Jun 2000 09:46:00 +0000 |
| Subject: | Re: incomplete-object-patch I | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-22048@lists.php.net to get a copy of this message | ||
On Thu, 22 Jun 2000, Adam Trachtenberg wrote:
> On Fri, 23 Jun 2000, Sascha Schumann wrote:
>
> > It only contains some cosmetic changes. Please try it,
> > your feedback is appreciated. Don't expect an answer before
> > tomorrow (12:00 CEST), I'm going to bed now.
>
> +static void reserved_class_message(void) {
> + php_error(E_ERROR, "Tried to execute a method or access a property of
> + an incomplete object. Please ensure that the class of the
> + object you are trying to operate on was loaded before the
> + session was started.");
> + }
>
> I haven't been actually using sessions + classes, so I'm not 100% sure of
> the behavior. But, if the point of these whole discussions in that people
> are trying to access objects from undeclared classes passed in via a
> session, would it be possible to actually print the name of the class in
> the error, so they actually have an easy way to figure out what they're
> supposed to include?
It does now. The new version of the patch can be found here
http://toye.php.net/~sas/incomplete-object-patch
> I usually like to tail the error_log to figure out how I've screwed up and
> putting the class name in the message makes it real easy to see what I'm
> missing. Having to dig up the page and hunt around in whatever location
> we've decided to stash the bad class name is a pain in the ass. Then
> again, we may already be doing this. If we are, maybe we should add the
> second sentence above to that message (which I believe is just a warning),
> as a pre-emptive strike against this error.
I'm not sure whether I understand what you are trying to say.
Currently, the first sentence describes what action has
triggered the halt of execution. Then we explain a possible
cause of the problem.
- Sascha