diff options
author | Stanislav Malyshev <stas@php.net> | 2002-08-18 12:22:28 +0000 |
---|---|---|
committer | Stanislav Malyshev <stas@php.net> | 2002-08-18 12:22:28 +0000 |
commit | 05156fa3490639b99e788ae3d31377c29a77d02f (patch) | |
tree | c78c2cbfdf09e7a441e8e0aaedc95b6e1773086d | |
parent | 93bbc5e531a82c4000f5da54f97c72b6a479baf2 (diff) | |
download | php-git-05156fa3490639b99e788ae3d31377c29a77d02f.tar.gz |
ZE2 compatibility fix
## In ZE2 the hash contains zend_class_entry *!
-rw-r--r-- | ext/standard/var_unserializer.re | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/ext/standard/var_unserializer.re b/ext/standard/var_unserializer.re index 457c5bf83d..185909492b 100644 --- a/ext/standard/var_unserializer.re +++ b/ext/standard/var_unserializer.re @@ -375,12 +375,20 @@ PHPAPI int php_var_unserialize(UNSERIALIZE_PARAMETER) zend_error(E_WARNING, "'unserialize_callback_func' (%s) hasn't defined the class it was called for", user_func->value.str.val); incomplete_class = 1; ce = PHP_IC_ENTRY; - } else + } else { +#ifdef ZEND_ENGINE_2 + ce = *(zend_class_entry **)ce; /* Bad hack, TBF! */ +#endif efree(class_name); + } } } - } else + } else { +#ifdef ZEND_ENGINE_2 + ce = *(zend_class_entry **)ce; /* Bad hack, TBF! */ +#endif efree(class_name); + } *p = YYCURSOR; elements = object_common1(UNSERIALIZE_PASSTHRU, ce); |