summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--131.patch22
-rw-r--r--php-netresearch-jsonmapper.spec12
2 files changed, 32 insertions, 2 deletions
diff --git a/131.patch b/131.patch
new file mode 100644
index 0000000..5b173f6
--- /dev/null
+++ b/131.patch
@@ -0,0 +1,22 @@
+From 6cdf7da6d2ff3affa0bc3fbf5517278abc23b3b8 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Thu, 8 Aug 2019 09:48:05 +0200
+Subject: [PATCH] fix Trying to access array offset on value of type null
+
+---
+ src/JsonMapper.php | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/JsonMapper.php b/src/JsonMapper.php
+index 2056ead..2bf1daf 100644
+--- a/src/JsonMapper.php
++++ b/src/JsonMapper.php
+@@ -592,7 +592,7 @@ protected function getMappedType($type, $jvalue = null)
+ {
+ if (isset($this->classMap[$type])) {
+ $target = $this->classMap[$type];
+- } else if ($type !== '' && $type[0] == '\\'
++ } else if (is_string($type) && $type !== '' && $type[0] == '\\'
+ && isset($this->classMap[substr($type, 1)])
+ ) {
+ $target = $this->classMap[substr($type, 1)];
diff --git a/php-netresearch-jsonmapper.spec b/php-netresearch-jsonmapper.spec
index 3213b2b..41f35ca 100644
--- a/php-netresearch-jsonmapper.spec
+++ b/php-netresearch-jsonmapper.spec
@@ -6,7 +6,7 @@
#
# Please, preserve the changelog entries
#
-%global gh_commit 047dafe26facbba1e997e9fb3b3c298562d75a0b
+%global gh_commit caf41ab74ac7252f5f46db6c16ab0a8358e2e55c
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner cweiske
%global gh_project jsonmapper
@@ -18,7 +18,7 @@
%global with_tests 0%{!?_without_tests:1}
Name: php-%{pk_vendor}-%{pk_project}
-Version: 1.5.1
+Version: 1.5.2
Release: 1%{?dist}
Summary: Map nested JSON structures onto PHP classes
@@ -28,6 +28,8 @@ Source0: %{name}-%{version}-%{gh_short}.tgz
# Git snapshot with tests
Source1: makesrc.sh
+Patch0: https://patch-diff.githubusercontent.com/raw/cweiske/jsonmapper/pull/131.patch
+
BuildArch: noarch
%if %{with_tests}
# For tests
@@ -81,6 +83,7 @@ Autoloader: %{php_home}/%{pk_vendor}/%{pk_project}/autoload.php
%prep
%setup -q -n %{gh_project}-%{gh_commit}
+%patch0 -p1
%build
@@ -124,6 +127,11 @@ exit $ret
%changelog
+* Thu Aug 8 2019 Remi Collet <remi@remirepo.net> - 1.5.2-1
+- update to 1.5.2
+- add patch for PHP 7.4 from
+ https://github.com/cweiske/jsonmapper/pull/131
+
* Tue Jul 9 2019 Remi Collet <remi@remirepo.net> - 1.5.1-1
- update to 1.5.1