summaryrefslogtreecommitdiffstats
path: root/php-5.6.0-mock.patch
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2014-06-23 19:31:08 +0200
committerRemi Collet <fedora@famillecollet.com>2014-06-23 19:31:08 +0200
commitf39479c31485313edd77e5f92b155280c3e08ff1 (patch)
tree16ef1410088e3c79a4093d5a5e49405e3f033ca7 /php-5.6.0-mock.patch
parentc40ba0efc45d83cdcd008206bfe3515ebfa358bf (diff)
php 5.6: add workaround for unserialize/mock issue from 5.4/5.5
Diffstat (limited to 'php-5.6.0-mock.patch')
-rw-r--r--php-5.6.0-mock.patch20
1 files changed, 20 insertions, 0 deletions
diff --git a/php-5.6.0-mock.patch b/php-5.6.0-mock.patch
new file mode 100644
index 0000000..37bc452
--- /dev/null
+++ b/php-5.6.0-mock.patch
@@ -0,0 +1,20 @@
+diff -up php-5.6.0RC1/ext/standard/var_unserializer.c.mock php-5.6.0RC1/ext/standard/var_unserializer.c
+--- php-5.6.0RC1/ext/standard/var_unserializer.c.mock 2014-06-19 03:26:09.000000000 +0200
++++ php-5.6.0RC1/ext/standard/var_unserializer.c 2014-06-23 18:51:04.702265786 +0200
+@@ -22,6 +22,7 @@
+ #include "php.h"
+ #include "ext/standard/php_var.h"
+ #include "php_incomplete_class.h"
++#include "Zend/zend_interfaces.h"
+
+ /* {{{ reference-handling for unserializer: var_* */
+ #define VAR_ENTRIES_MAX 1024
+@@ -394,7 +395,7 @@ static inline long object_common1(UNSERI
+
+ (*p) += 2;
+
+- if (ce->serialize == NULL) {
++ if (ce->serialize == NULL || ce->unserialize == zend_user_unserialize || ZEND_INTERNAL_CLASS != ce->type) {
+ object_init_ex(*rval, ce);
+ } else {
+ /* If this class implements Serializable, it should not land here but in object_custom(). The passed string