From 05156fa3490639b99e788ae3d31377c29a77d02f Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Sun, 18 Aug 2002 12:22:28 +0000 Subject: [PATCH] ZE2 compatibility fix ## In ZE2 the hash contains zend_class_entry *! --- ext/standard/var_unserializer.re | 12 ++++++++++-- 1 file 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); -- 2.50.1