fix PHP Warning: substr() expects parameter 1 to be string, array given

This commit is contained in:
Ralf Becker 2020-07-10 11:07:18 +02:00
parent d8a51abd8a
commit 502d423885
2 changed files with 3 additions and 7 deletions

View File

@ -200,7 +200,8 @@ class Login
}
}
$tmpl->set_var('login_url', $GLOBALS['egw_info']['server']['webserver_url'] . '/login.php' . $extra_vars);
$tmpl->set_var('login_url', $GLOBALS['egw_info']['server']['webserver_url'] . '/login.php?' .
substr($extra_vars,$extra_vars[0] === '&' || [0] === '?' ? 1 : 0));
$tmpl->set_var('version', $GLOBALS['egw_info']['server']['versions']['phpgwapi']);
$tmpl->set_var('login', htmlspecialchars($last_loginid));

View File

@ -54,7 +54,7 @@ if(isset($GLOBALS['sitemgr_info']) && $GLOBALS['egw_info']['user']['userid'] ==
$forward = isset($_GET['phpgw_forward']) ? urldecode($_GET['phpgw_forward']) : @$_POST['phpgw_forward'];
if (!$forward)
{
$extra_vars['cd'] = 'yes';
$extra_vars = 'cd=yes';
$forward = '/index.php';
}
else
@ -343,10 +343,5 @@ else
}
}
if($extra_vars)
{
$extra_vars = '?' . substr($extra_vars,1);
}
$GLOBALS['egw']->framework->login_screen($extra_vars, $force_password_change);
}