From a1f8b897afa8795ae5ca9a86965517314a110d6e Mon Sep 17 00:00:00 2001 From: Joby Elliott Date: Thu, 30 Aug 2018 12:40:42 -0600 Subject: [PATCH] push --- src/FlatArrayTrait.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/FlatArrayTrait.php b/src/FlatArrayTrait.php index 5f4819f..8108405 100644 --- a/src/FlatArrayTrait.php +++ b/src/FlatArrayTrait.php @@ -12,6 +12,9 @@ trait FlatArrayTrait if ($arr !== null && !is_array($arr)) { return; } + if ($arr === null) { + $arr = []; + } $arr[] = $value; $this->set($name, $arr); }