From: Pierre Joye Date: Tue, 28 Feb 2012 18:36:10 +0000 (+0000) Subject: - fix bug #60879, unserialize does not invoke __wakeup X-Git-Tag: php-5.4.0~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ee772f60b1f8397bdca29c24b492736ca38eead8;p=php - fix bug #60879, unserialize does not invoke __wakeup --- diff --git a/NEWS b/NEWS index d205b8b291..04eae24382 100644 --- a/NEWS +++ b/NEWS @@ -13,6 +13,8 @@ PHP NEWS default (Stas). . Fixed bug #60965 (Buffer overflow on htmlspecialchars/entities with $double=false). (Gustavo) + . Fixed bug #60879 (unserialize() Does not invoke __wakeup() on object). + (Pierre, Steve) . Fixed output layer compat function not passing along input buffer with php_output_context_pass() if the output_handler_func does not set out_str (releaze3 at gmail dot com, Mike) diff --git a/ext/standard/var_unserializer.c b/ext/standard/var_unserializer.c index b1c03dd80b..e1ac636d04 100644 --- a/ext/standard/var_unserializer.c +++ b/ext/standard/var_unserializer.c @@ -375,6 +375,9 @@ static inline long object_common1(UNSERIALIZE_PARAMETER, zend_class_entry *ce) return elements; } +#ifdef PHP_WIN32 +# pragma optimize("", off) +#endif static inline int object_common2(UNSERIALIZE_PARAMETER, long elements) { zval *retval_ptr = NULL; @@ -399,6 +402,9 @@ static inline int object_common2(UNSERIALIZE_PARAMETER, long elements) return finish_nested_data(UNSERIALIZE_PASSTHRU); } +#ifdef PHP_WIN32 +# pragma optimize("", on) +#endif PHPAPI int php_var_unserialize(UNSERIALIZE_PARAMETER) { diff --git a/ext/standard/var_unserializer.re b/ext/standard/var_unserializer.re index 7ea277b8b2..860b3947b9 100644 --- a/ext/standard/var_unserializer.re +++ b/ext/standard/var_unserializer.re @@ -379,6 +379,9 @@ static inline long object_common1(UNSERIALIZE_PARAMETER, zend_class_entry *ce) return elements; } +#ifdef PHP_WIN32 +# pragma optimize("", off) +#endif static inline int object_common2(UNSERIALIZE_PARAMETER, long elements) { zval *retval_ptr = NULL; @@ -403,6 +406,9 @@ static inline int object_common2(UNSERIALIZE_PARAMETER, long elements) return finish_nested_data(UNSERIALIZE_PASSTHRU); } +#ifdef PHP_WIN32 +# pragma optimize("", on) +#endif PHPAPI int php_var_unserialize(UNSERIALIZE_PARAMETER) {