From 2d8ed28626848ce0b8cb0bdc71f39d557a87cadc Mon Sep 17 00:00:00 2001 From: Remi Collet 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 +}