From de73bd0123139aaf893a45bbdf6848308e9dd1d7 Mon Sep 17 00:00:00 2001 From: "Thies C. Arntzen" Date: Wed, 15 Sep 1999 15:03:06 +0000 Subject: when unserializing classes: if the class is not known the standard class (no methods) will be used. if the class is known - the created object will functional again! --- ChangeLog | 4 ++-- ext/standard/var.c | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 534a3a0344..ebb2cdf286 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,8 +2,8 @@ PHP 4.0 CHANGE LOG ChangeLog ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ?? 1999, Version 4.0 Beta 3 -- Made serialize/unserialize work on classes & speedups. CAUTION: when - unserializing the class to be unserialized needs to be known! (Thies) +- Made serialize/unserialize work on classes. If the class is known at + unserialize() time, you'll get back a fully working object! (Thies) - Reworked preg_* functions according to the new PCRE API, which also made them behave much more like Perl ones (Andrey) - Made it possible to specify external location of PCRE library (Andrey) diff --git a/ext/standard/var.c b/ext/standard/var.c index 58bc8da3f6..dd291211ba 100644 --- a/ext/standard/var.c +++ b/ext/standard/var.c @@ -372,7 +372,8 @@ int php3api_var_unserialize(pval **rval, const char **p, const char *max) (*p) += i; if (zend_hash_find(EG(class_table), class_name, i+1, (void **) &ce)==FAILURE) { - php_error(E_WARNING, "Cannot instanciate non-existant class: %s", class_name); + php_error(E_NOTICE, "Unserializing non-existant class: %s! No methods will be available!", class_name); + ce = &zend_standard_class_def; } efree(class_name); -- cgit v1.2.1