From: Ilia Alshanetsky Date: Wed, 7 Oct 2009 12:46:29 +0000 (+0000) Subject: Fixed bug #49800 (SimpleXML allow (un)serialize() calls without warning). X-Git-Tag: php-5.4.0alpha1~191^2~2537 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8fb0baded3f688fa471e5b883cf346a84d864183;p=php Fixed bug #49800 (SimpleXML allow (un)serialize() calls without warning). # original patch by wmeler at wp-sa dot pl --- diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c index 57e3cabe6f..6e70ca7828 100644 --- a/ext/simplexml/simplexml.c +++ b/ext/simplexml/simplexml.c @@ -2588,6 +2588,8 @@ PHP_MINIT_FUNCTION(simplexml) sxe_class_entry = zend_register_internal_class(&sxe TSRMLS_CC); sxe_class_entry->get_iterator = php_sxe_get_iterator; sxe_class_entry->iterator_funcs.funcs = &php_sxe_iterator_funcs; + sxe_class_entry->serialize = zend_class_serialize_deny; + sxe_class_entry->unserialize = zend_class_unserialize_deny; zend_class_implements(sxe_class_entry TSRMLS_CC, 1, zend_ce_traversable); sxe_object_handlers.get_method = zend_get_std_object_handlers()->get_method; sxe_object_handlers.get_constructor = zend_get_std_object_handlers()->get_constructor;