From f39479c31485313edd77e5f92b155280c3e08ff1 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 23 Jun 2014 19:31:08 +0200 Subject: php 5.6: add workaround for unserialize/mock issue from 5.4/5.5 --- php-5.6.0-mock.patch | 20 ++++++++++++++++++++ php56.spec | 8 +++++++- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 php-5.6.0-mock.patch 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 diff --git a/php56.spec b/php56.spec index ef7014a..71e70b1 100644 --- a/php56.spec +++ b/php56.spec @@ -121,7 +121,7 @@ Summary: PHP scripting language for creating dynamic web sites Name: php Version: 5.6.0 %if 0%{?snapdate:1}%{?rcver:1} -Release: 0.14.%{?snapdate}%{?rcver}%{?dist} +Release: 0.15.%{?snapdate}%{?rcver}%{?dist} %else Release: 1%{?dist} %endif @@ -177,6 +177,8 @@ Patch45: php-5.4.8-ldap_r.patch Patch46: php-5.4.9-fixheader.patch # drop "Configure command" from phpinfo output Patch47: php-5.4.9-phpinfo.patch +# temporary fix (from 5.4/5.5) for unserialize/mock +Patch48: php-5.6.0-mock.patch # RC Patch Patch91: php-5.3.7-oci8conf.patch @@ -902,6 +904,7 @@ rm -rf ext/json %endif %patch46 -p1 -b .fixheader %patch47 -p1 -b .phpinfo +%patch48 -p1 -b .mock %patch91 -p1 -b .remi-oci8 @@ -1911,6 +1914,9 @@ fi %changelog +* Mon Jun 23 2014 Remi Collet 5.6.0-0.15.RC1 +- add workaround for unserialize/mock issue from 5.4/5.5 + * Mon Jun 23 2014 Remi Collet 5.6.0-0.14.RC1 - fix phpdbg with libedit https://bugs.php.net/67499 -- cgit