Skip to content

Commit

Permalink
Fix more PHP 8 warnings (bug #781)
Browse files Browse the repository at this point in the history
  • Loading branch information
vrana committed Feb 12, 2021
1 parent eebda86 commit ccb7442
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions adminer/include/adminer.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -956,6 +956,7 @@ function navigation($missing) {
echo "<ul id='logins'>\n$output</ul>\n" . script("mixin(qs('#logins'), {onmouseover: menuOver, onmouseout: menuOut});");
}
} else {
$tables = array();
if ($_GET["ns"] !== "" && !$missing && DB != "") {
$connection->select_db(DB);
$tables = table_status('', true);
Expand Down
2 changes: 1 addition & 1 deletion adminer/include/auth.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function add_invalid_login() {
function check_invalid_login() {
global $adminer;
$invalids = unserialize(@file_get_contents(get_temp_dir() . "/adminer.invalid")); // @ - may not exist
$invalid = $invalids[$adminer->bruteForceKey()];
$invalid = ($invalids ? $invalids[$adminer->bruteForceKey()] : array());
$next_attempt = ($invalid[1] > 29 ? $invalid[0] - time() : 0); // allow 30 invalid attempts
if ($next_attempt > 0) { //! do the same with permanent login
auth_error(lang('Too many unsuccessful logins, try again in %d minute(s).', ceil($next_attempt / 60)));
Expand Down
1 change: 1 addition & 0 deletions changes.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Adminer 4.8.1-dev:
Fix more PHP 8 warnings (bug #781)

Adminer 4.8.0 (released 2021-02-10):
Support function default values in insert (bug #713)
Expand Down

0 comments on commit ccb7442

Please sign in to comment.