From 291a7d6521264895fde772988ed6162e2b5c1701 Mon Sep 17 00:00:00 2001 From: Pekka Laiho Date: Thu, 4 Jun 2020 18:27:47 +0700 Subject: [PATCH] handle no input --- src/Reader.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Reader.php b/src/Reader.php index 5f27410..663359a 100644 --- a/src/Reader.php +++ b/src/Reader.php @@ -5,6 +5,10 @@ class Reader { public function read(array $tokens) { + if (empty($tokens)) { + return null; + } + $index = 0; return $this->readForm($tokens, $index); }