diff options
author | Thies C. Arntzen <thies@php.net> | 1999-09-15 15:03:06 +0000 |
---|---|---|
committer | Thies C. Arntzen <thies@php.net> | 1999-09-15 15:03:06 +0000 |
commit | de73bd0123139aaf893a45bbdf6848308e9dd1d7 (patch) | |
tree | 0f83eb7878e3daca50b9ef753edaec0df804a7bc | |
parent | b287aa2cf4be4a9902bb514074032aa11c2afcae (diff) | |
download | php-git-de73bd0123139aaf893a45bbdf6848308e9dd1d7.tar.gz |
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!
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | ext/standard/var.c | 3 |
2 files changed, 4 insertions, 3 deletions
@@ -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); |