]> granicus.if.org Git - php/commitdiff
ZE2 compatibility fix
authorStanislav Malyshev <stas@php.net>
Sun, 18 Aug 2002 12:22:28 +0000 (12:22 +0000)
committerStanislav Malyshev <stas@php.net>
Sun, 18 Aug 2002 12:22:28 +0000 (12:22 +0000)
## In ZE2 the hash contains zend_class_entry *!

ext/standard/var_unserializer.re

index 457c5bf83de75708e789f136b46519c6e0199f8a..185909492b70ef1e9c26dfc13e6c425568414029 100644 (file)
@@ -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);