Kirby 3.8.0 / database

Hi,
I get Invalid table: users when database is configured inside index.php like this:

<?php

require __DIR__ . '/kirby/bootstrap.php';
$kirby = new Kirby([
    'db' => [
        'host'     => 'localhost',
        'database' => 'dev',
        'user'     => 'root',
        'password' => '',
    ],
]);

echo $kirby->render();

and called inside a template like this:

<?php

$users = Db::select('users', '*', null, 'email DESC');
foreach($users as $user){
    echo $user->email();
}

but if I directly do the following inside the template file, it works like a charm:

<?php 
Db::connect("mysql settings to connect");
// ... and the rest of my code

is it normal behavior or a 3.8.0 bug?

The db settings need to go into the config: Database | Kirby CMS

Yes, this is exactly what I did. I’ve also created an alias, redownloaded the StarterKit… but same result…

Well, what you posted above is that you put in index.php instead of your config file…

The database settings work fine in 3.8 when they are set in config.php and are correct.

why did I put it there? maybe because it’s Friday…
Sorry for that, I’ll try to wake up :wink: