From ad20d17e4dfbf40f9dab4846567ebfa1a9b026de Mon Sep 17 00:00:00 2001
From: Guillaume Rousse <guillaume.rousse@renater.fr>
Date: Fri, 3 Aug 2018 16:26:04 +0200
Subject: [PATCH] fix a warning if no options present

---
 lib/AccountManager/App.pm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/AccountManager/App.pm b/lib/AccountManager/App.pm
index 03a4f72..4f96f48 100644
--- a/lib/AccountManager/App.pm
+++ b/lib/AccountManager/App.pm
@@ -131,7 +131,8 @@ sub new {
             host     => $self->{configuration}->{database}->{host},
             username => $self->{configuration}->{database}->{username},
             password => $self->{configuration}->{database}->{password},
-            options  => [ split(/, */, $self->{configuration}->{database}->{options}) ]
+            options  => $self->{configuration}->{database}->{options} ?
+                [ split(/, */, $self->{configuration}->{database}->{options}) ] : undef,
         );
     }
 
-- 
GitLab