Question: I'm trying to insert a date on a textbox and making controls (for example don't let the user to put a date which has still to come) but it throws an exception

```
string[] array = txtData.Text.Split('/');
int[] arrayint = new int[3];
arrayint[0] = Convert.ToInt32(array[0]);
arrayint[1] = Convert.ToInt32(array[1]);
arrayint[2] = Convert.ToInt32(array[2]);
try
{
    if (arrayint[0] > 0 && arrayint[0] < 32)
    {
        if (arrayint[1] > 0 && arrayint[1] < 13)
        {
            if (DateTime.Compare(DateTime.Today, Convert.ToDateTime(txtData.Text)) <= 0)
            {
                string s = txtTitolo.Text + ", " + txtData.Text + ", " + txtDim.Text + ", " + txtFormato.Text + ", " + txtRisoluzione.Text;
                listVideo.Items.Add(s);
            }
        }
    }
}
catch (Exception)
{
    MessageBox.Show("data non valida");
}

```

Thank you to everyone who will answer

Answer: 
This is a know bug in dotenv package - see the discussion here
<https://github.com/laravel/framework/issues/8191>
This happen to me as well. My workaround is in your `config/app.php` you have to add this:

```
'setting' => env('SETTING'),

```

Then when you want to get the setting config you have to do this:

```
$env = config('app.setting');

```