carlwgeorge / rpms / php

Forked from rpms/php 5 years ago
Clone
b9eda6e
diff -up php-5.6.0RC1/ext/standard/var_unserializer.c.mock php-5.6.0RC1/ext/standard/var_unserializer.c
b9eda6e
--- php-5.6.0RC1/ext/standard/var_unserializer.c.mock	2014-06-19 03:26:09.000000000 +0200
b9eda6e
+++ php-5.6.0RC1/ext/standard/var_unserializer.c	2014-06-23 18:51:04.702265786 +0200
b9eda6e
@@ -22,6 +22,7 @@
b9eda6e
 #include "php.h"
b9eda6e
 #include "ext/standard/php_var.h"
b9eda6e
 #include "php_incomplete_class.h"
b9eda6e
+#include "Zend/zend_interfaces.h"
b9eda6e
 
b9eda6e
 /* {{{ reference-handling for unserializer: var_* */
b9eda6e
 #define VAR_ENTRIES_MAX 1024
b9eda6e
@@ -394,7 +395,7 @@ static inline long object_common1(UNSERI
b9eda6e
 
b9eda6e
 	(*p) += 2;
b9eda6e
 	
b9eda6e
-	if (ce->serialize == NULL) {
b9eda6e
+	if (ce->serialize == NULL || ce->unserialize == zend_user_unserialize || ZEND_INTERNAL_CLASS != ce->type) {
b9eda6e
 		object_init_ex(*rval, ce);
b9eda6e
 	} else {
b9eda6e
 		/* If this class implements Serializable, it should not land here but in object_custom(). The passed string