Fixed infinte loop if SQLite connect_info has only a DSN (RT #47101)
[catagits/Catalyst-Model-DBIC-Schema.git] / lib / Catalyst / Helper / Model / DBIC / Schema.pm
index 049ff7e..1b7f591 100644 (file)
@@ -400,7 +400,7 @@ sub _get_dsn_user_pass {
 
     if ($dsn =~ /sqlite/i) {
         ($user, $password) = ('', '');
-        shift @$connect_info while $connect_info->[0] eq '';
+        shift @$connect_info while @$connect_info and $connect_info->[0] eq '';
     } else {
         ($user, $password) = splice @$connect_info, 0, 2;
     }