summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2015-07-24 11:15:32 +0200
committerRemi Collet <fedora@famillecollet.com>2015-07-24 11:15:32 +0200
commit538590813b0eb12706e4174330a9fc2922011a46 (patch)
treee40a6856e830711064639cfa9fb27c834d26a5ef
parent1156948a0bbc11eaa80f9f6de1a91a616aa97072 (diff)
php-pecl-json-post: fix for php7
-rw-r--r--json_post-php7.patch25
-rw-r--r--php-pecl-json-post.spec9
2 files changed, 33 insertions, 1 deletions
diff --git a/json_post-php7.patch b/json_post-php7.patch
new file mode 100644
index 0000000..3c85f80
--- /dev/null
+++ b/json_post-php7.patch
@@ -0,0 +1,25 @@
+From e54f65df2bcb68b4493832c83c141da9f579964e Mon Sep 17 00:00:00 2001
+From: Remi Collet <fedora@famillecollet.com>
+Date: Fri, 24 Jul 2015 09:57:36 +0200
+Subject: [PATCH] Fix: json_post.flags=2 ignored with php7
+
+Detected on 32bits build, where 003.phpt is failing
+(not detected on 64bits, because not covered)
+---
+ package.xml | 1 +
+ php_json_post.c | 2 +-
+ 2 files changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/php_json_post.c b/php_json_post.c
+index fd3165c..4a0fcd3 100644
+--- a/php_json_post.c
++++ b/php_json_post.c
+@@ -63,7 +63,7 @@ static SAPI_POST_HANDLER_FUNC(php_json_post_handler)
+
+ ZVAL_NULL(&tmp);
+
+- php_json_decode(&tmp, json->val, json->len, JSON_POST_G(flags), PG(max_input_nesting_level));
++ php_json_decode_ex(&tmp, json->val, json->len, JSON_POST_G(flags), PG(max_input_nesting_level));
+
+ switch (Z_TYPE(tmp)) {
+ case IS_OBJECT:
diff --git a/php-pecl-json-post.spec b/php-pecl-json-post.spec
index c437d1f..0c86beb 100644
--- a/php-pecl-json-post.spec
+++ b/php-pecl-json-post.spec
@@ -37,12 +37,14 @@
Summary: JSON POST handler
Name: %{?sub_prefix}php-pecl-json-post
Version: 1.0.0
-Release: 4%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 5%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
License: BSD
Group: Development/Languages
URL: http://pecl.php.net/package/%{pecl_name}
Source0: http://pecl.php.net/get/%{pecl_name}-%{version}%{?prever}.tgz
+Patch0: %{pecl_name}-php7.patch
+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: %{?scl_prefix}php-devel > 5.3
BuildRequires: %{?scl_prefix}php-json
@@ -105,6 +107,8 @@ mv %{pecl_name}-%{version}%{?prever} NTS
sed -e 's/role="test"/role="src"/' -i package.xml
cd NTS
+%patch0 -p1 -b .upstream
+
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_JSON_POST_VERSION/{s/.* "//;s/".*$//;p}' php_json_post.h)
if test "x${extver}" != "x%{version}%{?prever}"; then
@@ -240,6 +244,9 @@ rm -rf %{buildroot}
%changelog
+* Fri Jul 24 2015 Remi Collet <remi@fedoraproject.org> - 1.0.0-5
+- add upstream patch for PHP 7
+
* Wed Jul 22 2015 Remi Collet <remi@fedoraproject.org> - 1.0.0-4
- rebuild against php 7.0.0beta2