From e2f1330e776241a14690aa01e56ff66ce3e9e829 Mon Sep 17 00:00:00 2001 From: Stijn Mathysen Date: Tue, 1 Jun 2021 16:23:22 +0200 Subject: [PATCH] PHP8 - test for array key presence (#48) * test for array key presence * Update CHANGELOG.md Co-authored-by: Basil --- CHANGELOG.md | 4 ++++ src/Pick.php | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ef5a36a..32b3691 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## 2.6.1 (1. June 2021) + ++ [#48](https://github.com/nadar/quill-delta-parser/pull/48) PHP 8 compatibility. + ## 2.6.0 (2. December 2020) + [#42](https://github.com/nadar/quill-delta-parser/pull/42) Added PHP 8 Support. diff --git a/src/Pick.php b/src/Pick.php index a0bc594..3f75247 100644 --- a/src/Pick.php +++ b/src/Pick.php @@ -29,7 +29,7 @@ class Pick * @var Listener The listener object the picke was made from. */ protected $listener; - + /** * Create new line pick * @@ -51,7 +51,7 @@ public function __construct(Listener $listener, Line $line, array $options, $ind */ public function __get($name) { - return $this->options[$name]; + return array_key_exists($name, $this->options) ? $this->options[$name] : null; } /**