Well… none? Since I don’t even get to the login form? First I thought the browser might be passing a saved e-mail but even with a fresh browser, cleared cache & cookies and all saved logins removed the error shows up.
Again, this is »my« code for the controller:
<?php
return function ($kirby) {
// don't show the login screen to already logged in users
if ($kirby->user()) {
go('/');
}
$error = false;
// handle the form submission
if ($kirby->request()->is('POST') && get('login')) {
// try to log the user in with the provided credentials
try {
$kirby->auth()->login(get('email'), get('password'));
// redirect to the homepage if the login was successful
go('/');
} catch (Exception $e) {
$error = true;
}
}
return [
'error' => $error
];
};
The error happens in the template and I know now what the issue is. The ecs() helper expects a string, and if get('email') or get('password') is null, the error is thrown.