Re: incomplete-object-patch I

From: Date: Fri, 23 Jun 2000 14:32:00 +0000
Subject: Re: incomplete-object-patch I
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-22057@lists.php.net to get a copy of this message
On Fri, 23 Jun 2000, Sascha Schumann wrote: > It does now. The new version of the patch can be found here Cool. > 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. I guess I wasn't sure whether we spit out a warning when someone loads a session on a page when that session contains undefined objects. I think we do (so people will know that not everything in the session is usable). Right? If so, I would suggest adding a message telling people /why/ we're throwing that warning: + "Please ensure that the class definition <b>%s</b> of the object " \ + "you are trying to operate on was loaded _before_ " \ + "the session was started" Knowing that there's an undefined class, but not knowing how to fix it -- or even why it might not effect you (because someone else is using the class) -- isn't helpful all by itself. I went and looked around. These are the lines in /ext/standard/var.c 453 if (zend_hash_find(EG(class_table), class_name, i+1, (void **) &ce)==FAILURE) { 454 php_error(E_NOTICE, "Unserializing non-existant class: %s! No methods will be available!", class_name); 455 ce = &zend_standard_class_def; 456 } I was thinking we should also add something to line 454 mentioning that it'd be useful to predefine the class. Am I explaining myself more clearly now? -adam -- / adam maccabee trachtenberg | it's what you think... \ \ adam@student.com | http://www.student.com /

« previous php.dev (#22057) next »