summaryrefslogtreecommitdiffstats
path: root/101.patch
blob: c06d2b252b77bda1f748900dd311757a5d93eef6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
From 2d8ed28626848ce0b8cb0bdc71f39d557a87cadc Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
Date: Mon, 27 Jan 2020 08:24:35 +0100
Subject: [PATCH] fix Trying to access array offset on value of type null (7.4)

---
 src/Wrapper.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/Wrapper.php b/src/Wrapper.php
index 0a0a24a..19090cf 100644
--- a/src/Wrapper.php
+++ b/src/Wrapper.php
@@ -105,7 +105,7 @@ public function getProperties()
      */
     public function getProperty($name)
     {
-        return $this->schema->properties[$name];
+        return isset($this->schema->properties[$name]) ? $this->schema->properties[$name] : null;
     }
 
     /**
@@ -216,4 +216,4 @@ public function jsonSerialize()
         return $this->schema->jsonSerialize();
     }
 
-}
\ No newline at end of file
+}